Skip to main content

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.

caution

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

  1. Enable Script Manager in Perfmatters:

WP Admin -> Perfmatters -> Tools -> Script Manager

  1. Turn on Test Mode.
  2. Visit a target page while logged in and open Script Manager from the admin bar.
  3. Identify assets you do not need on that template.
  4. Apply the smallest scope that solves the problem:
ScopeWhen to Use
Current URLYou only want to change one page
Post Type / TemplateMost common: unload on a class of pages
Everywhere (with exceptions)Only when you are very sure
  1. Save, purge cache, test.
  2. When stable, disable Test Mode.

Common High-Impact Unloads

Examples (adjust to your stack)
static-site-unloads.txt
woocommerce
wc-cart-fragments
elementor-frontend
social-share
reviews
woocommerce-contextual-unloads.txt
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:

  1. Re-enable the asset you last unloaded.
  2. Purge caches.
  3. If you need the asset only on some pages, reduce scope (Current URL/Post Type) instead of Everywhere.

What's Next