New
Added new PERFMATTERS_DISABLE_CACHE and perfmatters_cache filter to disable the cache features.
Added new PERFMATTERS_DISABLE_DATABASE and perfmatters_database filter to disable database optimization features.
Added new perfmatters_code filter to disable code features, alongside PERFMATTERS_DISABLE_CODE.
Added new perfmatters_cache_warmer_mobile filter to warm a separate mobile copy when the warmer is being used without Perfmatters' page cache.
Added new perfmatters_cache_cloudflare_exclude_paths filter to modify the sites excluded from the root site's Cloudflare cache rule on a subdirectory network.
Improved
The cache warmer now fetches each URL like a normal visitor, so Cloudflare, APO, and host caches can store the page. If disk page cache is on and that request did not write a file, a follow-up loopback request writes it. Separate mobile sends an iPhone user agent so the mobile copy is stored separately.
* Improved the cache warmer user agent to use a plain Perfmatters/Warmer string (with a mobile token for separate mobile cache) instead of spoofed browser user agents, which could return Cloudflare 520 errors on hosts such as SiteGround when the warmer fell back to the public URL.
* Added new perfmatters_cache_warmer_user_agent filter to override the warmer user agent.
* Added new perfmatters_cache_browser_ttl filter to set browser Cache-Control max-age on cached HTML in seconds (default empty = no-cache, must-revalidate). Save cache settings after changing so page-config and .htaccess update.
* Cache settings now detect a stale page-config (including filter changes) and prompts to reinstall cache files.
* Swapped the settings subnav active and inactive colors to match the main Perfmatters menu behavior.
* Database and cache warmer Scan Now buttons now wait to show the completed message until the result counts finish printing.
* Replaced the Cloudflare Zone ID text field with a Zone setting (Auto or Manual Zone ID). Auto-detect is the default. Choosing Manual Zone ID reveals the Zone ID input field when needed.
* Saving a change to the Cloudflare Zone ID now correctly reloads the settings screen for necessary updates.
* Cloudflare cache rules no longer re-force the wordpress_logged_in cookie bypass after perfmatters_cache_bypass_cookies runs, so the default logged-in bypass can be removed via the filter when needed. Sync rules after changing the filter.
* Fixed Cloudflare single-URL purges (publish, update, clear URL) not invalidating edge HTML because cache rules matched GET/HEAD only. Rules now also match PURGE.
* Fixed Cloudflare cache rules sync on a shared zone (apex + subdomain) deleting the other site's rules. Sync now only removes this host's rules.
* Cloudflare cache rules now attempt to update automatically once in wp-admin on a rule version change.
* Updated the Perfmatters cache HTML comment to use the site's local timezone with a UTC offset.
* Renamed the Cloudflare status card success state from Ready to Connected.
* Translation updates.
* Added new Cache (BETA) tab with disk page cache, cache warmer, and Cloudflare edge cache. Page cache stores optimized HTML on disk with optional mobile separation, expiry, and cache rules for excluded URLs, bypass cookies, always-purge URLs, and query strings. The warmer can crawl posts, pages, and other public sources on a schedule or on demand. Cloudflare edge cache syncs Cache Rules via API token, with zone controls and edge TTL. Disk page cache is single-site only during beta and is automatically disabled on hosts that already provide page caching. 20+ new filter and action hooks added to the documentation. All Cache options remain off by default.
* Prefixed the bundled wp-background-processing library to avoid class conflicts that could slow down admin requests.
* Fixed code snippet PHP validation rejecting snippets that start with a namespace or declare() statement.
* Fixed code snippet recovery so a compile error in a snippet deactivates that snippet instead of leaving it active.
* Fixed an issue where Fetch Priority could match and rewrite tags inside inline script and noscript content.
* Fixed an issue where Script Manager MU Mode did not apply Current URL plugin rules on paginated WooCommerce shop URLs.
* Fixed an issue where Script Manager MU Mode disabled no plugins on sites using plain permalinks.
* Fixed an issue where Remove Unused CSS could delay, async, or remove stylesheets even when the used CSS file could not be written to disk.
* Added an admin warning notice when Remove Unused CSS fails to write the used CSS file.
* Fixed an uncaught Minify IOException when Local Google Fonts could not write to the fonts cache directory, which could abort HTML post-processing for the request.
* Fixed an uncaught Minify IOException when Minify CSS/JS could not write to the minify cache directory, which could abort HTML post-processing for the request.
* Fixed an uncaught Minify IOException when a code snippet JS/CSS file could not be minified on save, falling back to the non-minified file instead.
* Translation updates.
* Added new perfmatters_rucss_per_id_post_types filter which allows for unique used CSS files per post ID for provided post types.
* Adjusted Remove Unused CSS to generate separate used CSS files per taxonomy instead of one shared tax.used.css file.
* Updated PHP-CSS-Parser to 9.5.0, removing the thecodingmachine/safe dependency and improving @layer statement support.
* Added a REST API exception for GenerateBlocks Pro.
* Added built-in Remove Unused CSS exclusions for Elementor's new local and global per-document stylesheets.
* Updated delay JS quick exclusions for Elementor to include hooks.min.js and i18n.min.js to fix a dependency error.
* Updated JS optimize script tag regex to avoid hitting PCRE backtracking limits on pages with very large inline scripts.
* Added Brizy editor request parameters to the excluded page builders array.
* Added logic to prevent Disable WooCommerce Scripts option from running inside page builders.
* Replaced wp_admin_notice() usage in code snippets with standard admin notice markup for better compatibility with older WordPress versions.
* Fixed incorrect and missing text domains, and added translators comments for placeholder strings where needed.
* Fixed an issue where videos using nested source tags without a src attribute on the video element were not lazy loaded, including video tags with no attributes.
* Fixed an accessibility issue with lazy video preview thumbnails where the placeholder could not be focused or activated from the keyboard and was missing a proper accessible name.
* Improved picture tag lazy loading to use a more efficient source attribute migration technique and match forced attributes across the full picture markup.
* Added a sanitization callback for network settings on save.
* Improved prepared SQL handling for code snippet post queries and database optimization table scans.
* Security updates to improve escaping across the admin UI, including settings helpers, Script Manager, code snippets, license, support, and related screens.
* Fixed a compatibility issue with WP Captcha PRO that could return a blank page when opening the Script Manager.
* Fixed an issue where Delay JavaScript could skip inline scripts that contained HTML comments.
* Fixed an issue where Script Manager MU Mode could save incomplete rewrite rules when WordPress rebuilt them on a request with plugins disabled, which could 404 those routes until the next full flush.
* Fixed an issue where Script Manager MU Mode treated the post query argument as the current URL, so a front-end request could run another URL's plugin rules while WordPress served the original permalink.
* Fixed Script Manager MU Mode Current URL plugin rules so front page rules stay off search, feeds, and other views that share that path. The rules will also now apply correctly on private posts, pages, and the WooCommerce shop page.
* Fixed a fatal error in Script Manager MU Mode when another mu-plugin read active_plugins before WordPress had finished loading.
* Fixed an issue where Script Manager MU Mode could disable the wrong plugin whose folder name started with the folder of the plugin that was meant to be disabled.
* Fixed a fatal error when the Login URL disabled behavior is set to the 404 template and a logged-out visitor requests customize.php before the theme has loaded. Admin requests such as wp-admin and customize.php now fall back to the disabled message, since those requests never load the front-end.
* Added new Inline Excluded Stylesheets advanced option to automatically inline stylesheets excluded from Remove Unused CSS.
* Added new Safe Mode option to disable all Perfmatters performance optimizations sitewide without impacting security-related options or code snippets.
* Added new Load in Block Editor option for frontend CSS code snippets so those styles can also appear in the WordPress block editor canvas.
* Added new perfmatters_inline_scripts filter which allows you to inline specific local JavaScript files.
* Improved stylesheet inlining via the new perfmatters_inline_stylesheets filter (perfmatters_rucss_inline_stylesheets still supported), which can now run independently of Remove Unused CSS while still deferring to RUCSS for non-excluded stylesheets.
* Made some adjustments to code snippets UI visibility script.
* Moved Instant Page, Preconnect, and DNS Prefetch into the main Perfmatters queue so they respect the same request-level disable checks as other front-end optimizations.
* Removed redundant admin and ?perfmattersoff checks from FastClick output, which is already gated by the main Perfmatters queue.
* Fixed a PHP warning in Minify class when parse_url() returned false for a malformed script or stylesheet URL.
* Fixed a PHP fatal error that could stop buffer optimizations from running when one-per-line options were stored as a string instead of an array.
* Improved Remove Unused CSS to detect local stylesheets from the URL path, which should resolve most third-party CDN rewrites without needing the CDN URL setting or local stylesheet filter.
* Fixed an issue where Remove Unused CSS could delay, async, or remove external stylesheets that were never included in used CSS.
* Fixed get_file_path incorrectly stripping characters from asset paths on subdirectory installs in certain cases.
* Fixed a compatibility issue with Infinite Uploads that prevented code snippets from loading correctly.
* Fixed an issue where Perfmatters meta options were not available when creating a new post or page until after saving.
* Fixed an issue where code snippet filenames with non-ASCII characters (such as Korean) were incorrectly encoded on disk.
* Added missing license notices for bundled third-party libraries.
* Removed the Script Manager MU Mode dependency on pluggable.php to avoid conflicts with SMTP and other plugins that override core pluggable functions.
* Fixed an issue where Script Manager MU Mode could permanently deactivate plugins when another plugin (such as Freemius) wrote a filtered active_plugins list back to the database.
* Fixed an issue where Script Manager MU Mode could resolve some custom post type URLs to the wrong post ID.
* Fixed an issue where Fetch Priority would always use the first matched priority value when the same selector had separate device rules.
* Added ABSPATH checks to plugin include files where needed.
* Added capability checks to Used CSS and Minify clear actions, and sanitized the Used CSS file type parameter.
* Hardened license form request verification.
* Improved license and update API request handling to reduce how often sites contact the Perfmatters server, including longer update check caching, cached license status checks, and a staggered retry delay after failed update requests.
* Improved code snippet docblock parsing to use UTF-8 aware regex when reading snippet metadata.
* Improved reliability of snippet metadata parsing across different server environments.
* Fixed an issue with multiline code snippet descriptions not saving properly.
* Fixed an issue where the database optimization process button spinner was getting stuck without reloading the page.
* Translation updates.
* Added new perfmatters_rucss_delay_stylesheets filter which allows you to delay a specific stylesheet already excluded from used CSS.
* Added new load behavior option to delay CSS code snippets using the file print method.
* Added new code snippet URL-based conditions for path contains, path equals and path regex.
* Added additional support to code snippet search to allow the search value to match on the code input itself.
* Added default sort order controls to code snippet screen options.
* Made a change to allow an image tag with a missing src attribute to still be able to lazy load if it has a valid srcset attribute.
* Adjusted main code menu behavior to return to return to the base code view if selected while viewing a single code snippet.
* Fixed utility attribute encoding so certain characters are preserved instead of being converted to HTML entities.
* Fixed a possible JavaScript conflict with minimal analytics declaring variables in the global scope. The script is now wrapped in an IIFE for compatibility.
* Security update to improve escaping of Code Snippets list table admin links built from the current request URL.
* Security updates to add domain verification and content type validation to local Google fonts feature when downloading remote files.
* Translation updates.
* Security updates to improve PMCS admin output sanitization and query handling across snippet editor and list views.
* Translation updates.
* Added new Shortcode option when choosing a location for HTML code snippets.
* Added new code option to select the Editor Theme along with the ability to upload a custom CodeMirror 5 theme stylesheet.
* Added base64 encoding to exported code snippets to prevent import requests from being blocked by certain firewalls. Previously exported code snippet JSON files can still be imported.
* Added new Location helper class to store shared logic to parse and match string based location input fields throughout the plugin.
* Added the ability to use the 'front' keyword in location input fields to always match the front page of the site.
* Added additional lazy loading compatibility styles specifically for iframes placed inside Elementor text and HTML elements.
* Adjusted Script Manager Global View rows to always display multiple post IDs in ascending order.
* Multiple styling adjustments and fixes throughout the plugin UI.
* Made some changes to how certain UI elements trigger a forced reload in response to specific actions to make things less jarring.
* Fixed an issue where our compatibility styles for a lazy loaded video inside a responsive embed could break the layout if the core block library stylesheet was disabled.
* Fixed an issue where code type selection for individual code snippets was still visible even after saving.
* Fixed an issue where the next page buttons in the snippets table was still showing as active even when viewing the last page.
* Fixed an issue where stylesheets with protocol-relative URLs were not getting parsed for used CSS.
* Disabled lint markers for HTML code snippets, as they do not currently work for combined HTML and inline PHP code.
* Removed unnecessary instances of perfmatters-lazy-youtube class from lazy loading inline styles. All lazy loading video features are now using a shared perfmatters-lazy-video class.
* Removed unnecessary development directories from plugin files.
* Translation updates.