=== Script Surgery ===
Contributors: vexr
Tags: performance, scripts, optimization, core web vitals, page speed
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See exactly what scripts and styles load on each page type — which plugin added them, their size, whether they block rendering — and disable them per page type with one click.

== Description ==

**Script Surgery** gives you a visual, actionable view of every script and style loaded on your WordPress site — broken down by page type (homepage, single post, product, cart, etc.).

= What it does =

**Visual asset inventory**
See every enqueued script and style on each page type: the handle, which plugin or theme added it, file size, whether it loads in `<head>` (render-blocking) or footer, and async/defer status.

**Source attribution**
Each asset is attributed to: WordPress Core, a plugin (by name), your theme, or an external CDN. No guesswork.

**Per-page-type disable rules**
Disable any script or style on specific page types with one click. Elementor scripts loading on your checkout page? Slider scripts loading on cart? Disable them — no code required.

**Render-blocking detection**
Scripts loading in `<head>` without async or defer are flagged as render-blocking. Styles are flagged similarly. Fix the highest-impact issues first.

**Bulk actions**
"Only on this page" — disable a script everywhere except the current page type in one click. Reset individual or all rules at once.

= How data is collected =

Data is captured automatically when a logged-in administrator visits any frontend page. No cron jobs, no external requests. The WordPress admin bar shows a ⚗ indicator on each page type so you know what's been captured.

= Privacy =

Script Surgery only runs for logged-in administrators. No data is sent externally. All data is stored in your own database (transients + one options entry).

== Installation ==

1. Upload the `script-surgery` folder to `/wp-content/plugins/`
2. Activate through the 'Plugins' menu in WordPress
3. Visit your site's frontend pages as a logged-in admin — data is captured automatically
4. Go to **Script Surgery** in the WordPress admin menu

== Changelog ==

= 0.1.0 =
* Initial release. Script/style capture, source attribution, size detection, render-blocking flagging, per-page-type disable rules.
