=== Asset CleanUp: Page Speed Booster === Contributors: gabelivan Tags: unused css, critical css, page speed, minify css, minify javascript Requires at least: 4.7 Tested up to: 7.1 Stable tag: 1.4.0.6 Requires PHP: 5.6 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html Speed up your WordPress site by unloading unnecessary CSS and JavaScript, reducing page bloat, and managing your own Critical CSS per page type. == Description == WordPress themes and plugins often load CSS and JavaScript on pages that do not use them. A contact form may load on the homepage, a slider may load on a plain article, or store-related files may load outside the shop. Asset CleanUp shows you what each page loads and lets you unload what is not needed. This can reduce HTTP requests, page weight, and browser work while complementing your existing caching setup. Use Test Mode to validate changes as an administrator before they affect visitors. **Asset CleanUp gives you precise, testable control over every optimization.** = A safer workflow, without giving up control = The Dashboard keeps the technical detail experienced users need while guiding first-time users through **Getting Started**, **Test Mode**, and the central **Overview** page. Test changes before they affect visitors, then review and manage existing or leftover rules from one place. = CSS and JavaScript management = * View loaded stylesheets and scripts, organized by their source. * Unload unnecessary CSS and JavaScript on the homepage and on individual posts, pages, and custom post types. * Manage assets from the Dashboard, the post/page edit screen, or the front-end view. * Review unload rules, exceptions, asset attributes, page options, and leftover entries from the Overview page. * Minify and combine supported CSS and JavaScript, including supported inline code. * Preload selected CSS and JavaScript files when they need to be discovered earlier. = Granular manual Critical CSS management = Add, edit, and remove your own Critical CSS directly from the Dashboard. Keep manual CSS organized by supported page context instead of maintaining one large global block. Asset CleanUp does not automatically generate Critical CSS. It gives you a structured way to manage CSS that you prepare yourself. = Fonts and resource loading = * Combine, preload, asynchronously load, or remove Google Fonts requests, with `font-display` and preconnect controls. * Preload local font files and apply `font-display`. * Add `fetchpriority`, `loading`, and `decoding` attributes to images using simple matching or regular expressions. * Lazy-load images where appropriate. = WordPress cleanup options = * Remove unused WordPress features such as Emojis, Dashicons for guests, and Comment Reply. * Remove selected discovery links, metadata, and oEmbed resources from the document HEAD. * Disable RSS feed links or feeds when they are not needed. * Restrict or disable XML-RPC when your site does not rely on it. * Strip supported HTML comments, with exceptions where required. = Works with your caching setup, it does not replace it = Asset CleanUp is not a page-caching plugin. It controls what WordPress outputs; a page cache, server cache, or CDN can then store and deliver the optimized result. After changing rules, clear every active cache layer. Avoid enabling the same minify or combine feature in multiple optimization plugins at the same time. = Asset CleanUp Lite and Pro = Lite includes page-level asset management, Test Mode, manual Critical CSS for supported contexts, resource-loading controls, and WordPress cleanup options. **Go beyond individual CSS and JavaScript files with the Plugins Manager.** Lite includes an interactive preview of the **Plugins Manager** (rules can be explored, but saved only in Pro). In Pro, it can prevent entire plugins from running on frontend or Dashboard pages where they are not needed, not merely remove their CSS and JavaScript. This can reduce PHP work, database queries, and potential conflicts before the page is generated. [Asset CleanUp Pro](https://www.gabelivan.com/items/wp-asset-cleanup-pro/?utm_source=wp_org_lite&utm_medium=description&utm_campaign=lite_vs_pro) also adds broader conditional rules, hardcoded asset management, device-specific rules, and advanced JavaScript attribute and placement controls. = Documentation and support = * Read the [Asset CleanUp documentation](https://www.assetcleanup.com/docs/). * Ask a question in the [WordPress.org support forum](https://wordpress.org/support/plugin/wp-asset-clean-up/). = External Services and Privacy = **WordPress.org plugin icon service** When an administrator opens an Asset CleanUp Dashboard screen, the plugin may request public plugin information from the [WordPress.org Plugin API](https://api.wordpress.org/plugins/info/1.2/) to retrieve icons for installed plugins. This occurs only when the local icon cache needs to be populated and does not intentionally send the site URL or administrator details. See the [WordPress.org Privacy Policy](https://wordpress.org/about/privacy/). **Google Fonts preload audit** When an administrator runs the Google Fonts preload audit, Asset CleanUp may request discovered stylesheets and font files from [Google Fonts](https://fonts.google.com/) to analyze their preload requirements. These requests occur only during the administrator-initiated audit and can include the requested font URLs and standard HTTP metadata. See the [Google Privacy Policy](https://policies.google.com/privacy). The following two Asset CleanUp-operated services are optional. Both are disabled by default and require an administrator to opt in from `Asset CleanUp > Settings > Plugin Usage Preferences`. **Dashboard announcements** When an administrator enables announcements, Asset CleanUp periodically requests the [Asset CleanUp Lite announcements feed](https://drm6aghn7w1h8.cloudfront.net/_wpacu-lite-announcements.json) to show maintenance information, update notices, optimization guides, and occasional product offers in the WordPress Dashboard. The request does not intentionally include the site URL, administrator details, or site content. **Optional usage tracking** When an administrator enables usage tracking, Asset CleanUp sends an initial technical check-in and no more than one check-in per week to the [Asset CleanUp usage-tracking endpoint](https://www.assetcleanup.com/tracking/?wpacu_action=checkin). It can include software versions, Asset CleanUp settings and notice state, server and multisite information, theme and plugin identifiers, and the WordPress locale. The site URL, administrator name, and administrator email are not intentionally included. Disabling the setting stops future check-ins. The announcements and usage-tracking services are operated by the Asset CleanUp developer. See the [privacy policy](https://www.gabelivan.com/privacy-policy/). CloudFront infrastructure is provided by Amazon Web Services and is also subject to the [AWS Privacy Notice](https://aws.amazon.com/privacy/). == Installation == = Install Asset CleanUp Lite = 1. In the WordPress Dashboard, go to `Plugins > Add New`. 2. Search for `Asset CleanUp: Page Speed Booster`. 3. Click `Install Now`, then `Activate`. 4. Open `Asset CleanUp > Getting Started` and follow the guided setup. = Make your first optimization safely = 1. Go to `Asset CleanUp > Settings > Test Mode` and enable Test Mode. While it is active, your optimization rules are applied only to you as a logged-in administrator. 2. Open `Asset CleanUp > CSS & JS Manager` and select the page you want to optimize. 3. Start with an asset that is clearly unnecessary there, such as contact-form files on a page without a form. 4. Save the rule and test the page carefully on desktop and mobile. Check menus, forms, popups, sliders, and other interactive elements. 5. Clear page, server, and CDN caches. Disable Test Mode only after everything works correctly, then verify the page once more as a logged-out visitor. You can also manage assets from the post/page edit screen or directly from the front end after enabling front-end management in the plugin settings. = Manual installation = 1. Download the plugin ZIP file from WordPress.org. 2. Go to `Plugins > Add New > Upload Plugin` in the WordPress Dashboard. 3. Select the ZIP file, click `Install Now`, then `Activate`. 4. Open `Asset CleanUp > Getting Started`. == Frequently Asked Questions == = Is Asset CleanUp a caching plugin? = No. Asset CleanUp controls which CSS, JavaScript, and other optimizations WordPress outputs. It works best alongside a page cache, server cache, or CDN. = Does Asset CleanUp automatically remove unused CSS or generate Critical CSS? = No. You decide which assets to unload and provide any Critical CSS yourself. This keeps each optimization inspectable and under your control, but it also means that every change should be tested. = Can Asset CleanUp improve Core Web Vitals or PageSpeed scores? = It can help when unnecessary CSS or JavaScript contributes to transfer size, render blocking, or browser work. Results still depend on your theme, plugins, hosting, caching, media, third-party scripts, and configuration. No plugin can guarantee a particular score. = Can unloading a CSS or JavaScript file break the page? = Yes, if that file is required for the page's layout or functionality. Use Test Mode, make one meaningful change at a time, and test desktop, mobile, forms, navigation, popups, and other interactive elements before publishing the rule to visitors. = I am not sure which assets to unload. Where should I start? = Start with obvious candidates: * Contact-form assets on pages without a form. * Slider or gallery assets on pages without a slider or gallery. * Store-related assets on pages outside the shop flow. Avoid unloading WordPress core files or dependency files unless you understand what relies on them. = Why are my changes not taking effect? = The most common cause is caching. Clear plugin, server, browser, and CDN caches, then test as a logged-out visitor. Also check whether Test Mode is still enabled and whether another optimization plugin is applying the same type of rule. See the [detailed troubleshooting guide](https://www.assetcleanup.com/docs/changes-applied-not-taking-effect/). = Why is a CSS or JavaScript file missing from the manager? = WordPress-enqueued assets are the easiest to detect and manage. Some files may be hardcoded, injected dynamically after the page loads, removed earlier by another plugin, or hidden by a cached response. Try another asset-retrieval method or the front-end manager. Advanced hardcoded asset management is available in Asset CleanUp Pro. = Can I use Asset CleanUp with another performance plugin? = Yes. Asset CleanUp is commonly used with caching plugins and CDN services. Do not enable the same minify, combine, or related optimization in more than one tool, because overlapping transformations can cause conflicts or make troubleshooting difficult. = Does Asset CleanUp support WordPress Multisite? = Yes. Each site can be configured independently. == Screenshots == 1. CSS & JS Manager — inspect the assets loaded on a page and unload unneeded CSS or JavaScript by page or site-wide. 2. Overview — review active unload rules, load exceptions, async/defer attributes, and stale entries in one place. 3. Manual Critical CSS — add and manage your own Critical CSS for individual pages and other WordPress contexts. 4. Getting Started — follow a guided, safety-first workflow from Test Mode to your first optimization. 5. Settings — configure asset retrieval, cleanup, Test Mode, and plugin behavior from clearly organized sections. == Changelog == = 1.4.0.6 = * **New:** Admin Bar transfer savings estimates for unloaded CSS/JS files and removed inline code, with AJAX-based measurements and Brotli/GZIP indicators. * **Improvement:** Separate effective asset unloads from rules that had no effect on the current page, with inactive rules grouped by asset type. * **Improvement — Rule Management:** "Overview" is now the recommended place to review and manage bulk rules, including dormant rules left behind by deleted pages or deactivated plugins. Removed "Bulk Changes" from the top navigation, WordPress sidebar, and Admin Bar. The legacy page remains accessible through its direct URL and existing bookmarks: /wp-admin/admin.php?page=wpassetcleanup_bulk_unloads * **Improvement:** The "CSS/JS Manager" and Admin Bar now explain when "Page Options" disable optimizations, including CSS/JS unload rules. Admin Bar warnings identify disabled features, while clearer descriptions, dimmed overridden options, and quick links make these settings easier to understand. * **Improvement — Debugging "/?wpacu_debug":** Added temporary "Page Options" overrides without changing saved settings. Debugging controls now update their availability and distinguish global restrictions, Page Options overrides, and missing rules. * **Improvement — Debugging "/?wpacu_debug":** Added per-file CSS/JS optimization details explaining content changes, unchanged results, exclusions, failures, and cache decisions. Multiple optimization reasons can be shown for the same file. * **Improvement — Overview:** Added navigation entries for "Page Options" and "Special Settings", clarified page overrides, and dimmed redundant options. * **Fixed — Interface:** Corrected "Overview" horizontal overflow and alignment. * **Fixed — CSS Optimization:** When an optimized stylesheet has a matching `