WordPress 7.0.0 Stable
What's new
Version 7.0.0 is a major release. It requires PHP 8.2 or later, and we recommend all users update: it includes security fixes.
AI-assisted optimization run (Pro, beta): from the dashboard's new AI-Assisted Optimization panel, an AI works through optimizing a page of your site the way an experienced person would, starting with your home page. Each batch of settings is tried on a private preview your visitors don't see, checked in a browser for anything it broke, and measured with PageSpeed Insights on mobile and desktop. The settings that made the page faster are saved, and the run ends with a report of the scores before and after. It needs an AI Optimization license and your own Anthropic (Claude) or OpenAI API key.
Page Experience (Pro): real-user monitoring of the Core Web Vitals (LCP, INP and CLS), measured in your visitors' own browsers and shown day by day, per device and page, with an email when your site gets slower than its baseline. LCP Images now chooses a page's LCP image from what visitors' browsers reported, instead of guessing.
Development mode no longer deactivates JCH Optimize: it switches optimization off with the plugin left active, so its settings stay available. The Mode Switcher is now part of the plugin, in the free version too.
Fonts and JavaScript (Pro): Optimize Fonts can serve Google Fonts from your site, adds size-matched fallback fonts so the page doesn't shift when a web font loads, has a Font display setting with Optional, and can defer icon fonts until after the first paint. New settings load analytics and ad pixel scripts after the first paint, and scripts such as a consent manager asynchronously.
Images: Optimize Images (Pro) keeps each original and always optimizes again from it, and can run unattended on a schedule. The settings that load optimized images moved to the Media tab, Replace existing srcset lets your theme's images use JCH Optimize's responsive images, and a new Smallest image on phones setting lets high-resolution phones choose a sharper image.
Cache: outdated pages are removed from the Page Cache, its static files and Cloudflare when posts or pages change, and other systems can purge pages through the REST API (Pro). Expired cache is deleted by a WP-Cron job instead of during a visitor's page load. Editors can clear the page cache from Tools > Page Cache, and a new Logs tab can explain why a page wasn't optimized or cached.
Security: this release fixes addresses and JSON being written back to the page in a way that could let HTML in them, such as from a visitor's comment, run script, and stops Authors and Contributors from deleting the whole cache.
Many bugs were fixed, including critical CSS being extracted again for every page and visitor on large sites, imported CSS lost from cached combined files, and static cached pages losing the site's security headers. See the CHANGELOG for details.
Developed and tested on up to PHP 8.5.13 and WordPress 7.1.5Changelog
New features
- Add Page Experience: real-user monitoring of the Core Web Vitals (LCP, INP and CLS), with FCP and TTFB, measured in your visitors' own browsers on a share of page views and shown day by day, per device and page, on JCH Optimize's new Page Experience tab. Set a baseline and every new day is compared with it, with an email when your site gets slower. The dashboard's Notifications panel shows whether it is on, its regressions and whether measurements are arriving. Turn it on with Measure page experience on the Page Experience tab of Configurations. [Pro Version]
- Add Scheduled Optimization to Optimize Images: with Optimize images automatically set to hourly, twice daily or daily, WP-Cron optimizes the images found on the site's pages unattended. Each run continues where the last one stopped, pauses when your plan's rate limits are reached and resumes after the wait, with an email when it pauses if you want one, and the Optimize Images tab shows the latest job under the file tree. [Pro Version]
- Add a Defer these font files setting to Optimize Fonts: the listed font files load after the page's first paint, so they don't compete for bandwidth with what visitors see first. Meant for icon fonts such as Font Awesome, whose icons are blank spaces until they load. [Pro Version]
- Add a Font display setting to Optimize Fonts, with Optional next to Swap: the web font gets a very short time to load, so fonts never shift the page or delay the Largest Contentful Paint. Force swap policy is now Override font-display in the CSS. [Pro Version]
- Add a Load these files after the first paint setting to the JavaScript tab, for analytics and ad pixel script files: each listed file starts only after the page has painted, on every page view and without waiting for an interaction, so PageSpeed doesn't count it in the time to the largest paint. [Pro Version]
- Add a Load these files asynchronously setting next to it, for script files that must run unchanged but nothing else depends on, such as a consent manager: a listed file stays where it is and is given the async attribute, so it no longer blocks the page from rendering. [Pro Version]
- Add a Logs tab that shows JCH Optimize's logs: general, image optimization, Recache and the AI-assisted optimization run, with a Log level setting on the General tab choosing what is written. With Log level set to Debug, it says why each page isn't optimized, such as an excluded page, a logged-in user with Disable logged-in users on, jchnooptimize in the URL, a page in an iframe, or another plugin switching it off with jch_optimize_no_optimize (with the filter's callbacks), and why each page isn't served from or stored in the Page Cache, such as a submitted form, an excluded page, or another plugin switching it off, and lists the plugins that can switch it off.
- Add the AI-assisted optimization run (beta), from the dashboard's AI-Assisted Optimization panel: an AI works through optimizing a page of your site the way an experienced person would, starting with your home page. Each batch of settings is tried on a private preview your visitors don't see, checked in a browser for anything it broke and corrected, and measured with PageSpeed Insights on mobile and desktop. The settings that made the page faster are saved, the live page is checked once more, and the run ends with a report of the scores before and after, the settings it changed and what it couldn't fix. It needs an AI Optimization license and your own Anthropic (Claude) or OpenAI API key. The panel takes the place of the optimizing services link, and the free version shows it as available in Pro. [Pro Version]
- Added Delete expired cache to Utility Tasks: deletes only the cached pages and files that have expired, as the Delete expired cache schedule does, keeping the rest.
- Added a Replace existing srcset setting to Load Responsive Images, on by default: images that WordPress or your theme already gives a srcset now use JCH Optimize's responsive images, where before they were left as they were. Switch it off to keep your theme's own srcset on those images.
- Added a Responsive image widths setting to the Optimize Images tab's Responsive Images section, as on Joomla: the widths of the mobile and tablet images Optimize Images makes, 480 and 768 by default. Crop these images resizes the part of an image it keeps to the mobile width. [Pro Version]
- Added a Smallest image on phones setting to Load Responsive Images, on by default. Responsive images give phones the smallest version of an image whatever the screen's pixel density, which loads fastest but can look soft on high-resolution phones. Switch the setting off, instead of switching responsive images off, to let phones choose the version that suits their screen. Background images in CSS follow the setting too.
- Added an Integrate mode switcher setting on the Page Cache tab, on by default: the page cache is switched off in Development mode and on in Production mode. Switch it off to switch the page cache and the mode separately.
- Added the WEBP load policy setting (load WEBP images for all browsers, or only for browsers detected as supporting them) to the Media tab's Load AVIF/WEBP Images section.
- HTTP/2 Preload's Preload JavaScript modules, Include files and Exclude files settings are available in the free version.
- Images that your theme's own script loads from data-src, such as UIkit's and lazysizes' images, get the WebP or AVIF copies Optimize Images made and can be preloaded as the page's LCP image. [Pro Version]
- Optimize Fonts adds size-matched fallback fonts: until a web font loads, its text is shown in Arial or Times New Roman resized to take up the same space, so the page doesn't shift when the web font swaps in. [Pro Version]
- Optimize Fonts can serve Google Fonts from the site: the stylesheets and their font files are saved in the cache folder and combined with the site's CSS, so pages no longer connect to Google's servers. It's on by default while Optimize Fonts is on. [Pro Version]
- Other systems can delete cached pages through WordPress's REST API: DELETE /wp-json/jch-optimize/v1/page-cache deletes every cached page, and POST /wp-json/jch-optimize/v1/page-cache/purge deletes the cached versions of the pages whose addresses it lists, with their static files and Cloudflare's copies. The request needs a user who can clear the page cache, with an application password. [Pro Version]
- Page Cache ignores common ad and social tracking parameters (utm_*, fbclid, gclid, msclkid) on new installs, so links from campaigns and social posts are served from the cache.
- Remove outdated pages from the Page Cache, its static files and Cloudflare when posts or pages are published, updated, unpublished, trashed or deleted, or their comments change, and clear the cache when menus, widgets, categories, tags or the theme change. The new Pages to purge on post changes setting on the Page Cache tab chooses between the affected pages and the whole cache. [Pro Version]
- Restore or delete the backups of only the images and folders selected in Optimize Images, and resize every image in a folder by entering a width and height beside it. [Pro Version]
- Show the debug mode and configure helper status, the cache storage status, and whether another page caching plugin is active (in red, since two page caches interfere) in the Notifications panel on the dashboard, with a warning when a configure helper is left on, the configured cache storage is unavailable, or JCH Optimize doesn't load first.
- Stylesheets that load without blocking the page are also linked in a noscript element, so they apply in browsers without JavaScript.
- The Mode Switcher menu has a Page Cache item that switches the page cache by itself, and its icon's color shows what is on: green for optimization and the page cache, grey with the page cache off, orange with only the page cache on, red with both off. [Pro Version]
- With Exclude form users on, other plugins can trigger the jch_optimize_user_post_form_delete_cookie action to serve a visitor who submitted a form from the Page Cache again before the end of its lifetime, for example after they empty their cart.
Removed features
- Remove the Order plugin setting and the Order Plugin button in Utility Tasks: JCH Optimize's page cache no longer needs to load before other plugins, and a plugin that always loads itself first (such as FluentSMTP) kept the order wrong. The dashboard warns instead when another page caching plugin is active.
Noteworthy changes
- Raised the minimum PHP version to 8.2.
Bug fixes
- [HIGH] Fix image, link and video addresses that aren't valid URLs being written back to the page with their HTML entities decoded, and JSON rewritten for the CDN with left unescaped, which could let HTML in them, such as from a visitor's comment, break out and run script.
- [LOW] Fix Cache Info failing when a cache file was removed while the cache was being counted.
- [LOW] Fix Delete Cache in the admin bar's JCH Optimize menu doing nothing for users it was shown to who couldn't delete other users' pages, and the jch_clear_page_cache capability having no effect when a role editor plugin gave it to a user who couldn't delete posts. [Pro Version]
- [LOW] Fix LCP Images preloading only the desktop image of a background image configured for both viewports, and a configured image that names a file also selecting other sizes of it (photo.jpg selecting photo-300x200.jpg), so a thumbnail could take the hero's preload. [Pro Version]
- [LOW] Fix Load responsive images adding srcset and sizes to an image in a picture element with sources, and LCP Images preloading such an image, or one the page already gives fetchpriority="high", instead of giving it high priority. [Pro Version]
- [LOW] Fix Load responsive images wrapping background images in a further set of media queries each time the CSS was processed again with Optimize CSS Delivery, and leaving an element's ::before or ::after with no background image at all. [Pro Version]
- [LOW] Fix Optimize Images setting aside 32 MB of memory to save each optimized image, which failed on sites with a low memory limit, and missing background images in all but the page's first CSS group when optimizing by URL. [Pro Version]
- [LOW] Fix a held-back script's jQuery load handlers never running with Reduce Unused JavaScript when jQuery is critical, which could leave a portfolio grid unlaid out. [Pro Version]
- [LOW] Fix an off-canvas panel at the start of the page ending the count of elements above the fold, which left the whole visible page below the fold.
- [LOW] Fix deleting expired cache on a very large cache running into PHP's time limit before deleting anything, so the cache never shrank and each attempt held a PHP worker. When it can't finish in time, the whole cache is cleaned instead.
- [LOW] Fix font URLs written without quotes and containing @ being broken in @font-face rules.
- [LOW] Fix removing a section from .htaccess leaving blank lines behind and collapsing the file's other blank lines.
- [LOW] Fix the Custom CSS, Mobile CSS and Desktop CSS boxes gaining spaces around their CSS each time the settings were saved, and CSS containing breaking the settings form. Spaces already added are removed the next time you save.
- [LOW] With Cloudflare's Mode switcher integration off, switching between Production and Development mode no longer switches Cloudflare's Development Mode. [Pro Version]
- [MEDIUM] Fix Authors and Contributors being able to delete the whole cache from Tools > Page Cache, which anyone who could delete their own posts was offered. It now takes an Editor, or a user given the jch_clear_page_cache capability. [Pro Version]
- [MEDIUM] Fix Optimize CSS Delivery extracting the critical CSS again for each page built from the same template, such as each product page of a shop, because the links, images and ids on each page were part of its cache key, and for every visitor without a session cookie, such as bots, the Recache crawler and first visits, because form tokens were. On large sites, the cache grew with every page and pages kept loading slowly. Pages now share their critical CSS when the stylesheets can't tell them apart.
- [MEDIUM] Fix a configured LCP image, HTTP/2 preloads and prefetches having no effect after a settings change that left the page's contents unchanged, because the values from before the change were kept.
- [MEDIUM] Fix a page shown in a frame, such as a video popup of the page itself, loading everything Reduce Unused JavaScript and Reduce Unused CSS held back at once, which slowed the page that framed it. A lazy-loaded iframe of the page itself is left empty. [Pro Version]
- [MEDIUM] Fix a stylesheet that imports several others, with Replace Imports on, keeping only the last import's contents in its cached combined file, so pages served from the cache lost the other imported CSS, such as a Google Font's @font-face rules.
- [MEDIUM] Fix an expired cache cleanup that failed partway leaving the Page Cache switched off: no new pages were cached until the cache was cleared.
- [MEDIUM] Fix deleting expired cache leaving pages cached for the other device, or before a settings change, linking to deleted CSS and JavaScript files, so they showed broken until they expired. Those pages are deleted with the files now.
- [MEDIUM] Fix inline scripts that Reduce Unused JavaScript deferred without combining them never running. [Pro Version]
- [MEDIUM] Fix pages served as static files losing the headers the site sent with them, such as security headers (Cross-Origin-Opener-Policy, X-Frame-Options, Referrer-Policy) and Link preloads, on Apache and LiteSpeed. [Pro Version]
- [MEDIUM] Fixed stylesheets listed in Optimize Fonts' "Optimize these files" being removed from the page while Optimize Fonts is off. They are combined as usual. [Pro Version]
- [MEDIUM] With Optimize CSS Delivery on, Optimize Fonts keeps the @font-face rules used above the fold in the critical CSS. It moved them to a separate stylesheet that loaded after the page, which delayed the fonts. [Pro Version]
Miscellaneous changes
- A settings export is named after the site and the time it was made.
- Combined files delivered with PHP are served through WordPress as soon as the plugin loads, at URLs that follow your permalink settings, compressed by the GZip setting, which moves under Combined files delivery and is no longer an automatic setting.
- Custom CSS is added after the combined CSS, as its own style element at the bottom of the head, so its rules take precedence.
- Development mode no longer deactivates JCH Optimize, which locked you out of its settings and Optimize Images: it switches optimization off with the plugin left active, and the dashboard's top switch is now Optimization. The Mode Switcher menu in the admin bar is part of the plugin instead of a must-use plugin, which updating removes, and it is in the free version too, with an Upgrade to Pro item.
- Editors and Administrators can clear the page cache without access to the settings, from Tools > Page Cache, in the free version too, where it took a role editor plugin until now. Other users can still be given the jch_clear_page_cache capability with a role editor plugin.
- Expired cache is deleted by a WP-Cron job, jch_optimize_clear_expired, instead of while visitors load pages, which slowed down the page that did it. Delete expired cache now chooses how often it runs: Hourly, Twice Daily, Daily (the default, and what Yes becomes) or Disabled.
- HTTP/2 Preload no longer preloads the images and fonts it found in the critical CSS, and its File types setting is removed: those preloads competed with the LCP image and often went unused. LCP Images and Optimize Fonts preload what the top of the page needs. HTTP/2 Preload preloads JavaScript modules and the files in Include files, which are now added to the other preloads instead of replacing them.
- LCP Images chooses the LCP image of a page without a configured one from Page Experience: the image visitors' browsers most often reported as the page's LCP element over the last two weeks, for phones and desktops separately. It no longer guesses the largest image near the top, so without Page Experience only configured LCP images are preloaded. [Pro Version]
- Lazy load loads an iframe below the first screen when the visitor scrolls near it, with lazysizes, instead of with loading="lazy", which some browsers loaded before the first paint. [Pro Version]
- Optimize Fonts preloads the two font files most likely to show the text above the fold, preferring basic Latin, upright fonts in the weights the page uses, whether or not HTTP/2 Preload is on. HTTP/2 Preload chooses the font files it preloads the same way. [Pro Version]
- Optimize Images keeps each image's original and always optimizes again from it, never from the optimized file, so changing the image settings (turning on AVIF, another quality) makes the new copies from the full-quality image. Ignore optimized images now skips only images already optimized with the current image settings; the others get their missing WebP, AVIF and responsive copies. Restoring an image treats it as never optimized. The list of optimized images moves to .jch/jch.json when you update. [Pro Version]
- Page Cache's Use Http Requests setting is renamed Serve Cached Pages as Static Files, and the Page Cache page's HTTP Request column, filter and status Static File, so the feature is easier to recognize. [Pro Version]
- Reduce Unused JavaScript and Reduce Unused CSS no longer switch themselves off for testing tools such as Lighthouse and PageSpeed Insights, so these measure your pages as visitors get them. [Pro Version]
- Saving settings that change what pages hold deletes the cached pages, from the Page Cache, its static files and Cloudflare, so pages served as static files no longer keep the old settings until they expire.
- The cookies JCH Optimize sets are marked Secure on HTTPS requests.
- The settings that load the images Optimize Images makes moved from the Optimize Images tab to the Media tab: Loads AVIF/WEBP images, Load WEBP images and Load AVIF images are in a new Load AVIF/WEBP Images section, and Load responsive images in a new Load Responsive Images section. The Optimize Images tab keeps the settings for making the images. Saved settings are unchanged.
JCH Optimize for WordPress
| Downloaded | 0 times |
| File size | 2.05 Mb |
| MD5 Signature | 479ec0d9fa0f47340a0210079f44b29d |
| SHA1 Signature | bce5ff743a47d5123faf5c250ce7a0b8f815915d |
| SHA-256 Signature | e41a0bbc7e4ef4ebadaa01be3eb86c0435950031a67384d818703a1fae298eb6 |
| SHA-384 Signature | d2a6361d7497b01b614bb9bfb94af5e866a0250edb5e79e5dc1098cde0b60bb047785a11df16fe4768fc3dffbad4c099 |
| SHA-512 Signature | 26d4f65b52dc02bf2f00d11787523c11709227f6f00b40f15d9956162bd54a5b7573a55e8aeda2e057a1d10103de2b6fa3a4a3c9b229a6d816473c3ab00530ba |