Most WordPress pages load at least a few stylesheets or scripts that are useful somewhere on the site but unnecessary on the page you are viewing. Removing those files from the requests where they are not needed can reduce transferred code, browser work, and the chance of front-end conflicts. The important part is deciding what can be unloaded without removing functionality the page still relies on.
What “unused” really means on a WordPress page
A file is a good unloading candidate only when the current page does not need the behaviour or presentation that file provides. A contact-form stylesheet may be unnecessary on an article without a form. A gallery script may be unnecessary on a page without a gallery. A WooCommerce stylesheet may look unused on a marketing page but still affect a mini-cart or account component in the header.
This is why a coverage percentage or a performance audit cannot make the final decision for you. A browser tool can show that much of a stylesheet was not used during one recording, but it cannot know every interaction, responsive state, logged-in variation, validation message, modal, or late-loaded element that a visitor may trigger.
Two levels of control: assets and complete plugins
Asset CleanUp separates two related jobs. Keeping them separate makes optimisation safer and makes the result easier to debug.
| Question | CSS/JS Manager | Plugins Manager |
|---|---|---|
| What is controlled? | Individual enqueued CSS and JavaScript files | The complete plugin on matching requests |
| Does the plugin’s PHP still run? | Yes | No, when an unload rule matches |
| Best use | The plugin is required, but some of its front-end assets are not | The plugin provides no required functionality on that request |
| Availability | Core asset management is available in Asset CleanUp Lite, with additional controls in Pro | Rules are applied by Asset CleanUp Pro; Lite provides a read-only preview |
Keep the plugin, unload selected files
Choose CSS/JS Manager if a form plugin must process a form on the page but an optional styling file is not used, or if a theme feature loads a script that this template does not need.
Skip the complete plugin
Choose Plugins Manager when the plugin has no role on the request and you have tested that no shortcode, hook, integration, cookie, REST request, or shared component depends on it.
The distinction matters because unloading a CSS or JavaScript file does not stop the plugin’s PHP code. It only prevents that selected browser asset from being printed or downloaded on matching pages. This can improve front-end delivery, but it does not remove the server-side work performed by the plugin.
How to find sensible CSS and JavaScript candidates
Start with pages whose purpose you understand well. A simple article, contact page, landing page, or documentation page is easier to test than a checkout with several dynamic integrations.
-
Load the exact URL in CSS/JS Manager
Asset CleanUp groups enqueued files by their source, which makes it easier to see whether a stylesheet or script belongs to WordPress core, the active theme, a plugin, or an external service.
-
Connect each file to visible functionality
Look at the handle, source path, plugin group, and any notes you have recorded. A recognisable filename is a clue, not proof. Check the page source, browser Network panel, and the plugin’s documentation when the relationship is unclear.
-
Test states beyond the initial screen
Resize the viewport and use every important interaction. Trigger validation errors, open accordions and menus, test search or filtering, and repeat the check while logged out. Conditional functionality may not appear during the first page load.
-
Prefer a narrow rule first
Unload the file on one page before applying a post-type, taxonomy, RegEx, or site-wide rule. Once the result is proven across representative URLs, you can safely broaden the scope.
Chrome DevTools Coverage can help identify code that was not executed or applied during a recording. It is useful for investigation, but its result describes only the states you recorded. It should support your decision rather than make it automatically.
A safe workflow in CSS/JS Manager
-
Enable Test Mode
While Test Mode is active, your optimisation changes can be reviewed by the administrator before they are exposed to regular visitors. Keep a separate logged-out browser window available for comparison.
-
Change one logical group at a time
If a plugin adds one stylesheet and two related scripts, test that group together when they clearly provide one feature. Avoid changing assets from several unrelated plugins in the same pass because a failure becomes harder to isolate.
-
Save, clear the relevant caches, and reload
A page cache, CDN, browser cache, or generated CSS/JavaScript cache can hide the result. Clear only the caches involved in the test, then verify the HTML and Network panel to confirm the intended file is actually absent.
-
Test the complete user journey
Check desktop and mobile layouts, logged-in and logged-out views, forms, consent tools, search, account pages, cart actions, checkout, and any AJAX or REST-driven feature affected by the page.
-
Record why the rule exists
Use asset notes and review the final rules in Overview. A short explanation such as “gallery is not present on standard posts” is valuable when the theme or plugin is updated months later.
-
Expose the change gradually
Disable Test Mode only after the representative pages pass. Recheck the public page after deployment and monitor error reporting, conversion paths, and support feedback.
When Plugins Manager is the better tool
If the entire plugin is unnecessary on a request, unloading only its CSS and JavaScript leaves its PHP code, hooks, database queries, cookies, and possible HTML output in place. Plugins Manager can prevent WordPress from loading that plugin on the requests matched by your rules.
This deeper level of control can be appropriate for a specialised plugin used on a small set of pages, an administrative utility that has no front-end responsibility, or a feature whose complete request scope is known. It also carries more responsibility: a plugin can participate in authentication, caching, multilingual routing, security, commerce, or background integrations without rendering anything visible.
Read How to Disable WordPress Plugins on Specific Pages with Asset CleanUp Pro for the complete decision process, unload rules, load exceptions, and testing workflow.
Common mistakes to avoid
- Optimising only for the request count. Modern HTTP can handle parallel requests efficiently. File size, render blocking, execution time, main-thread work, caching, and correctness matter as well.
- Using a global unload before testing a page-level rule. A broad rule can affect templates and user states you did not know were connected.
- Testing only while logged in. Admin bars, cache exclusions, consent states, and personalised markup can produce a different asset list.
- Ignoring responsive and interactive states. A stylesheet can appear unused until a mobile breakpoint or validation message is reached.
- Combining several optimisation techniques at once. Unloading, deferring, delaying, minifying, and combining in one pass makes the cause of a regression difficult to identify.
- Forgetting third-party updates. A plugin update can add a new dependency or begin using a file that was previously optional. Review important rules after substantial updates.
How to measure whether the change helped
First confirm that the page still works. Then compare the same URL, environment, cache state, device profile, and test location before and after the change. Look at the transferred CSS and JavaScript, render-blocking resources, browser execution time, the waterfall, and relevant user-experience metrics. Run several tests because network and server variation can distort a single result.
An unload can be worthwhile even when a synthetic score barely moves. Removing code that never needs to reach the browser simplifies the page and can reduce the surface for conflicts. At the same time, a tiny cached file may not justify a complex rule. Prefer changes that have a clear reason and remain maintainable.
Choose the right level of control
Start with individual assets, then go deeper only when needed
Use Asset CleanUp Lite to inspect and manage enqueued CSS and JavaScript. Asset CleanUp Pro adds advanced rules and Plugins Manager for request-level control over complete plugins.
Thank your recommend
W3 Total Cache using faster loading website
What a fantastic idea – don’t load unused scripts for a particular page or post!
Put it to the test on a play site. The play site was loading a Google Map script on every page, but the Google Map was only needed in the Contact Us page. Yeah I know, why load a script when it’s not needed? Boom! and then I find this 🙂
This little beauty is fantastic!
looking forward to its development over time.
@Chook, thanks for the feedback. I left you a reply on WordPress.org, updated the plugin on the repository and on your test website. As you can see, it works 100% now without any issues. I wish you could update the rating you left at least for the support I offered 🙂
Hi
Have you encountered problems when using SSL?
I receive a message saying no scripts or styles are enqueued properly (although too many are!) on https://thestatemanagementstory.org
I’m using Really Simple SSL
If your plugin works, I’d pay for it.
Thanks
Paul
Hi –
I tried to submit a bug report in both Firefox and Chrome, but both times I got an error saying that the recaptcha was required, but there wasn’t one anywhere on the page.
I’ve been using the free version of your plugin for a while and just upgraded to the paid version in order to be able to unload rules from categories and tags. Great tool, thanks so much!
I’m having a problem with “bulk unloaded” /wp-admin/admin.php?page=wpassetcleanup_bulk_unloads. There are a couple of items in both styles and scripts that belong to a plugin that’s no longer installed on my site, so I’m trying to remove them, but when I click “update” the page just reloads – they’re all still there and there’s no error message. Any ideas?
Thank you,
Laura
Hello, Laura!
Thank you for using the plugin. I’ll check the problem on the contact form, it’s good that you reported it. I’ve done some changes there and you should be able to submit the contact form properly now. Regarding the bug you noticed, it will be fixed in the next version of the plugin which you will be able to update automatically within the Dashboard (if you have activated the license). Someone else reported it as well and it looks like it does this to elements from plugins that are not loading anymore.
Note that this is just a record in the database that is just printing there and in no way the asset is loading so it won’t affect your website functionality (e.g. making it slower). Since the plugin doesn’t load, the asset won’t load either. I know, it annoying to see it printed there, and not being able to clean the database record (which you can do it directly through a software like phpMyAdmin if you know what you’re doing, but I recommend to not touch that if you’re not a developer or have experience with MySQL databases), but you can just ignore it for now. If you’re keen to have it removed sooner from that list, let me know and we can take the matter on private. My apologies for this inconvenience!
All the best,
Gabe
Hi
Please, where can I disable this setting (WordPress CSS & JavaScript core files are hidden as requested in the plugin’s settings) to be able to see wordpress java files?
Fausto, go to “Settings” -> “General & Files Management” then scroll to “Hide WordPress Core Files From The Assets List?” and uncheck the option to show the WordPress core files. Just be careful when you unload any of them 😉
Thank you very much Gabe