Script Manager
A script manager lets you unload plugin/theme CSS and JS on pages where it is not needed. This is one of the highest-leverage ways to improve INP and reduce total bytes because many plugins enqueue assets globally by default.
Unload one thing at a time, purge caches, and re-test critical flows (forms, login, cart/checkout). Start in Test Mode if your tool supports it.
What You Are Actually Changing
Unloading an asset prevents CSS/JS from loading on a page. It does not necessarily disable the plugin's server-side behavior.
That means:
- You can often keep a plugin installed but stop its front-end assets from loading sitewide.
- You can also break functionality if you unload a dependency (for example jQuery or a theme script).
Perfmatters Script Manager Workflow
- Enable Script Manager in Perfmatters:
WP Admin -> Perfmatters -> Tools -> Script Manager
- Turn on Test Mode.
- Visit a target page while logged in and open Script Manager from the admin bar.
- Identify assets you do not need on that template.
- Apply the smallest scope that solves the problem:
| Scope | When to Use |
|---|---|
| Current URL | You only want to change one page |
| Post Type / Template | Most common: unload on a class of pages |
| Everywhere (with exceptions) | Only when you are very sure |
- Save, purge cache, test.
- When stable, disable Test Mode.
Common High-Impact Unloads
Examples (adjust to your stack)
woocommerce
wc-cart-fragments
elementor-frontend
social-share
reviews
wc-cart-fragments (unload on blog/about)
stripe/paypal sdk (load only on checkout)
reviews/ratings scripts (load only where reviews render)
Static vs Dynamic Guidance
Static sites can unload aggressively because most pages are cacheable and have fewer interactive requirements. Dynamic sites need tighter rules and more testing on transactional flows.
Validation
After unloading:
- DevTools -> Network: confirm the assets are no longer requested on the page.
- DevTools -> Console: confirm no new JavaScript errors.
- Run a quick PSI/Lighthouse pass and check that total JS decreased and long tasks improved.
Rollback
If something breaks:
- Re-enable the asset you last unloaded.
- Purge caches.
- If you need the asset only on some pages, reduce scope (Current URL/Post Type) instead of Everywhere.