Speed up your WordPress site with a few clicks using our lightweight Perfmatters plugin. โก Get help directly from the developers. We don't outsource support. ๐ฌ
Version 2.7.1 of @_perfmatters is live!
- *New* perfmatters_cache_warmer_user_agent filter.
_ *New* perfmatters_cache_browser_ttl filter. ๐ฐ๏ธ
- Improved the cache warmer user agent to use a plain Perfmatters/Warmer string instead of a spoofed browser user agent, which could return Cloudflare 520 errors on certain hosts when the warmer fell back to the public URL.
- 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. ๐ช
- 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.
We really appreciate all the feedback we've been getting regarding the new beta features! ๐
https://t.co/YExvM8jZdO
Version 2.7.0 of @_perfmatters is live!
-*New* page cache feature. ๐
-*New* Cloudflare edge cache feature. โก
-*New* cache warmer feature. ๐ฅ
-*New* 25+ additional filters and action hooks related to page cache and warming. ๐จโ๐ป
Important notes
- These features are in beta. If you run into any issues, please reach out. Weโre always happy to help as we make improvements.
- Like everything in Perfmatters, all cache features are off by default.
- We built all three features with our modular approach in mind. For example, at some managed hosts, page cache is automatically disabled. But you can still utilize the warmer feature (or vice versa). Mix and match as needed.
- Multisite support is not quite there yet, but we are already working on it. Coming soon.
Additional changes
- Fixed code snippet PHP validation rejecting snippets that start with a namespace or declare() statement.
- Prefixed the bundled wp-background-processing library to avoid class conflicts that could slow down admin requests. โก
- 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.
https://t.co/YExvM8jZdO
Version 2.6.9 of @_perfmatters is live, with a lot of fixes and improvements!
-*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 fixing semicolon-terminated layer statements. This improves compatibility with third-party solutions and makes parsing more reliable for anything that uses cascade layers, such as Bricks. ๐
- 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.
https://t.co/YExvM8jZdO
Version 2.6.8 of @_perfmatters is live!
- *New* highly requested safe mode option to disable all Perfmatters performance optimizations sitewide (excluding security/code snippets). ๐ง
- *New* inline excluded stylesheets advanced option to automatically inline stylesheets excluded from remove unused CSS. โก
- *New* perfmatters_inline_scripts filter which allows you to inline any local JS files.
- *New* load in block editor option for frontend CSS code snippets so those styles can also appear in the WordPress block editor canvas. ๐จ
- Drastically 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. ๐
- 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 it for non-excluded stylesheets.
- Made some adjustments to code snippets UI visiblity script.
- Moved 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. ๐จโ๐ง
- 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.
https://t.co/YExvM8jZdO
Version 2.6.7 of @_perfmatters rolled out last week.
- Removed the Script Manager MU Mode dependency on pluggable.php to avoid conflicts with SMTP and other plugins that override core pluggable functions. This makes MU Mode a lot more reliable. ๐
- 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.
- Hardened license form request verification. ๐
- Added capability checks to Used CSS and Minify clear actions, and sanitized the Used CSS file type parameter.
- 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. โก
https://t.co/YExvM8jZdO
Version 2.6.5 of @_perfmatters is live!
- *New* code snippet URL-based conditions for path contains, path equals, and path regex. This enables every possible combination. ๐จโ๐ฌ
- *New*ย perfmatters_rucss_delay_stylesheetsย filter which allows you to delay a specific stylesheet already excluded from used CSS.
- *New* load behavior option to delay CSS code snippets using the file print method. โก
- 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.
https://t.co/YExvM8jZdO
Snippet Converter for Perfmatters
I coded this for my sites and wanted to share it. It has saved me a TON of time.
Currently, Perfmatters allows you to import snippets that were created within Perfmatters.
This plugin allows you to get around that by converting third-party code snippet JSON exports into the Perfmatters PMCS import format.
https://t.co/Y5cRgmri8Y
Perfmatters is a performance plugin that goes on all my WordPress sites, so it only made sense to let it handle my code snippets.
If you're looking for a deal on Perfmatters, the best place to get one is on InfluenceWP[dot]com.
Affiliation Disclaimer
This plugin is not affiliated with, endorsed by, or officially connected to the Perfmatters team in any way. Perfmatters is a trademark of its respective owner.
Version 2.6.3 of @_perfmatters is live!
- *New* option to select the editor theme for code snippets and global scripts. ๐จ 10 themes included (Ayu Dark, Ayu Mirage, Dracula, Eclipse, Idea, Material, Monokai, Neo, etc.). You can also upload a custom CodeMirror 5 theme stylesheet.
- *New* shortcode option when choosing a location for HTML code snippets. Generate a shortcode you can use anywhere you need to run the code.
- 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.
https://t.co/YExvM8jZdO
Version 2.6.2 of @_perfmatters is live!
*New* Automatically optimize and lazy load Elementor Atomic YouTube elements and legacy video widgets when Perfmatters iframe lazy loading is turned on. YouTube preview thumbnails are also supported, as well as Elementor image overlays if set. โก
- Added request-level caching to excluded and forced lazy loading attribute arrays to prevent unnecessary calls.
- Added multiple stripos and str_contains (PHP 8) checks in lazy loading image and iframe functions to prevent expensive regex scans if tags donโt exist. ๐
- Added new should_skip_request method in core LazyLoad class with request-level caching to prevent duplicate checks for WooCommerce pages and post-specific meta options.
- Added support to various General class functions to respect ?perfmattersoff. This makes troubleshooting with the query string more accurate. ๐
- Added filters back to turn off WordPressโ lazy loading and auto-sizing styles when Perfmatters lazy loading is turned on.
- Added built-in JS and CSS exclusions for WooCommerceโs dynamically added woocommerce-js body class.
- Refactored LazyLoad class into multiple subclasses for better maintainability. ๐
- Removed duplicate list normalization step before replacement across LazyLoad classes to reduce loop overhead.
- Renamed previous Images class to ImageDimensions to make room for new Images lazy loading subclass.
- Fixed an issue where certain lazy loaded tags were getting replaced globally in the document instead of only at the specific tag match instance.
https://t.co/YExvM8jZdO
Excited that we finally acquired the https://t.co/PoET4mV0af domain (after a decade of trying). ๐
We'll continue using https://t.co/Jy1oCCxeNj for the time being. But things may change down the road.
A redirect is now in place. โคด๏ธ
Version 2.6.1 of @_perfmatters is live!
This is a quality-of-life update to improve compatibility across the board. ๐
- Made some adjustments to our code snippets error handler initialization logic to avoid unnecessary handling if no relevant code snippets are active.
- Made additional plugin UI styles adjustments in preparation for WordPress 7. ๐จ
- Updated our exception_handler method with more specific error logging when our handler is dealing with an error outside of our code snippets.
- Updated Disable RSS Feeds tooltip text to reflect the recent header changes in the previous update.
- Fixed an error that would occur when UTF-8 stylesheets with specific multibyte characters were parsed for used CSS. ๐ฃ
- Fixed multiple incorrect form label IDs that showed up when creating a new code snippet.
- Fixed an issue with Disable Self Pingbacks functionality that was introduced after the functions.php refactor.
- Fixed an issue where a JS or CSS file preloaded dynamically by handle would not serve the minified version of the file in certain cases. ๐๏ธ
- Fixed an issue where the inline stylesheet fallback was not always converting relative URLs correctly if certain characters were present in the string.
https://t.co/YExvM8jZdO
Hey Blake,
Sorry about that. We put out a hotfix earlier today. Might still be cached in a few places.
Ironically, this update included our new "silo" feature, but we missed a sub-library. The good news is that going forward, this will prevent similar errors from ever happening.
Thanks for understanding.
@BlakeWhittle7 Sorry about that! Ironically, this update included our new "silo" feature, but we missed a sub-library.
The good news is that going forward, this will prevent similar errors from ever happening.
Thanks for understanding.
Version 2.6.0 of @_perfmatters is live!
- Updated PHP CSS Parser library to 9.3.0. This includes many improvements for our Remove Unused CSS feature (more accurate parsing/compatibility). โก
- *New* perfmatters_rucss_logged_in filter that allows you to force used CSS to run when logged in (still front-end only) and create separate copies of used CSS for logged-in requests. This is experimental and only for advanced users; results may vary.
- Added additional logic to used CSS generation to better deal with layer elements that are declared without a content block.
- Added PHP Scoper to our plugin development workflow to be able to silo specific third-party libraries to prevent conflicts with other plugins. ๐จโ๐ง
- Removed built-in stylesheet exclusion for Bricks' layer files. We recommend clearing used CSS after updating.
- Added new CSS helper method to rewrite relative URLs in stylesheets that will be printed inline using regex only to prevent having to pass them through the parser. This improves compatibility when using the perfmatters_rucss_inline_stylesheets filter. ๐
- Made some adjustments to clean_html regex pattern to avoid potential backtracking which could end up hitting a PCRE limit in some cases.
- Made plugin UI styles adjustments in preparation for WordPress 7. ๐จ
- Made improvements to visual transitions during hard reloads in the plugin UI.
- Updated code snippets author column to use the user's display name instead of nice name to match the single snippet layout.
- Updated disable RSS feeds function to return a 410 header instead of a 301 when requesting a feed URL.
- Made some changes to plugin UI nav JS to improve compatibility when wrapper elements are added in the HTML from another source.
- Fixed an issue that was causing certain attribute values to conflict with the HTML parent selector matching regex.
- Fixed an issue where specific WooCommerce product types were not getting the built-in product exclusion selector added to generated used CSS.
- Fixed an issue where HTML snippets with a condition mismatch were causing the original content to return blank.
- Fixed an issue where code snippet input preserved in the form after a failed save request was not properly unslashed.
- Fixed an issue where the code snippet code type was no longer visible and the selected value was lost after a failed save request.
- Fixed a possible PHP 8.2+ deprecation warning that could occur in specific server environments during PMCS initialization.
- Code snippet security updates to form submission handling. ๐
https://t.co/YExvM8jZdO
Version 2.5.8 of @_perfmatters is live!
- Code Snippets is officially out of beta. ๐ We appreciate all of you who took the time to test and provide feedback.
- Performance improvements: Refactored Utilities class, added a few functions from the previous combined file, combined regex passes for clean_html, added memoization to necessary functions to prevent multiple runs. โก
- Added new perfmatters_lazyload_data_src filter.
- Added nav selector support for functions that target elements inside parent containers. ๐จโ๐ง
- Added additional built-in CSS selector exclusion for Kadence active state class.
- Added is_admin check to disable dashicons function for certain edge cases in the admin UI.
- Added logic to prevent certain redundant options from showing up in the UI when parent disables are already toggled on.
- Added new General, License, and Analytics classes to separate out specific functionality.
- Fixed a code snippet issue where targeting the front or blog page of the site by page ID would not match correctly. ๐ป
- Fixed an issue with certain attribute pair formats not being recognized when converting an elementโs attribute string to an array.
- Fixed an issue where delaying certain duplicate scripts would cause a JavaScript error and prevent remaining delayed assets from loading in.
- Fixed multiple plugin UI HTML warnings for incorrect label target IDs.
- Made some lazy loading adjustments to let WordPress still add the auto size attribute value when necessary before the Perfmatters output buffer runs.
- Made changes to the way we handle images excluded from lazy loading to ensure they donโt have a loading attribute applied.
- Removed previous functions.php file, refactored and migrated the contents to new and existing classes. ๐๏ธ
- Minor update to disable self pingbacks function for better compatibility.
https://t.co/YExvM8jZdO
@wpgaurav Wow, this looks great, Gaurav! ๐ We really appreciate all the time you put into this.
We'll add this to our newsletter.
And we've noted your "Cons." Some of which we're already working on. ๐ Feedback like this helpful.