Perfmatters addresses many optimizations most cache plugins don’t.
I prefer Perfmatters over Asset CleanUp because the interface is cleaner, it includes more optimizations, and it’s maintained better with new features which you’ll find in the changelog. This guide should help you configure the ideal Perfmatters settings to give you the best results.
Affiliate Disclaimer – I use affiliate links and appreciate your support. Once you purchase it and upload it to WordPress, add your license key and let’s get started.
Some Perfmatters settings may overlap with your cache plugin and cause duplicate functionality, but may want to test it in Perfmatters to see if it gives you better results.
- Disable Emojis: ON – removes JS file loaded by emojis.
- Disable Embeds: ON – when you paste a URL into your WordPress editor, this feature loads a pretty preview (from YouTube, Facebook, Tweets, etc). Disable if you don’t use it.
- Disable XML-RPC: ON – bad for speed + security (used to publish content from mobile).
- Hide WP Version: ON – improves security by hiding WP version from showing publicly.
- Disable Password Strength Meter: – removes a file that can sometimes load on your website when it should usually only load on account, checkout, and password reset pages.
- Add Blank Favicon: – only used for speed testing purposes on fresh WP installs.
- Remove Global Styles: – removes 311 lines of unminified code which seemed to be added by mistake to WordPress core. It was originally added to improve duotone styles.
- Script Manager: ON – lets you edit pages/posts to remove unused CSS/JS (see below).
- Delay Behavior: – better control of which files are delayed. “Delay all scripts” is more aggressive but may include files loading above the fold and others you may not want delayed. In that case, you would need to exclude those files.
Using The Script Manager
Once the script manager is enabled, view any page/post and it will be in the admin bar.
Next, view scripts/styles loading on that post (they will be categorized by plugins). You can disable them everywhere, on current URL, use regex (URL patterns), and make exceptions.
- Disable social sharing buttons on everywhere but posts.
- Disable contact form plugin everywhere but contact page.
- Disable slider plugin on all posts if they’re only used on pages.
- Disable any page builder plugins where they’re not being used.
- Disable schema plugin on all pages if they’re only used on posts.
- Disable email plugins on pages if forms are only used on your blog.
- Disable page builder CSS/JS (but most have built-in settings for this).
- Remove Unused CSS:
- Stylesheet Behavior:
- Clear Unused CSS: use this if you make design/code changes and aren’t seeing them.
Preload, preconnect, prefetch are often recommended in PSI. Many cache plugins automatically preconnect CDN URLs and Google Fonts (and some add preload automatically too). Read up on your cache plugin’s documentation, then use Perfmatters to add more resource hints if needed.
- Enable Instant Page: – downloads pages in the background when users hover over a link. However, this can cause high CPU usage and the benefit might not outweigh the cost.
- Preload: use this to preload fonts mentioned in the CSS style and any fonts loading above the fold (only self-hosted fonts can be preloaded). PSI also tells you which fonts to preload under preload key requests. Images usually don’t need to be added here (use next setting).
- Preload Critical Images: – preloads above the fold images, resulting in a faster LCP. The number should be determined by how images are typically above the fold (i.e. 2-3).
- Preconnect – CDN URLs and third-party Google Fonts (font.gstatic.com) are the most common URLs to preconnect. Your cache plugin may already do this, so make sure to check the documentation. Fonts should always be preconnected using CrossOrigin.
- Prefetch – open your “reduce impact of third-party code report” in PSI (or GTmetrix Waterfall chart) and they’ll list all third-party domains loading on your site. Other than CDN URLs + third-party fonts which you’ll use preconnect, the rest should be prefetched.
4. Lazy Loading
- Images: excluding them manually is better).
- Exclude From Lazy Loading – above the fold images should be excluded from lazy load which can improve LCP. Copy those image URLs and add them so they’re not lazy loaded.
- DOM Monitoring – only enable if you use infinite scrolling). Kinsta says this “watches for changes in the DOM and dynamically lazy loads newly added elements. This improves compatibility for third-party plugins and themes that utilize infinite scrolling…”
- Add Missing Images Dimensions: – adds width/height to images without dimensions to prevent layout shifts while fixing the “use explicit width + height” PSI recommendation.
- Fade In: – adds a fade in effect for lazy loaded images so they don’t jump in suddenly.
- Disable Google Fonts: – only use if you’re in the process of using system fonts or custom fonts and need to disable them. Otherwise, it removes Google Fonts on your site.
- Display Swap: – adds font-display: swap to your font CSS which can fix “ensure text remain visible during webfont load” in PSI. While it fixes FOIT (flash of invisible text) by setting a fallback font, it can also cause FOUC (flash of unstyled text) which can look ugly.
- Local Google Fonts: – downloads fonts.google.com fonts and hosts them locally.
- CDN URL: add a CDN URL to serve self-hosted fonts from your CDN (i.e. BunnyCDN, StackPath, etc). But this does not apply to Cloudflare since they don’t use a CDN URL.
- Enable CDN Rewrite – – if you’re using a CDN URL, this rewrites assets to be served from the CDN (i.e. https://cdn.yourwebsite.com/wp-content/uploads/2022/02/logo.png). Cloudflare doesn’t use a CDN URL in which case you’d skip the CDN section all together.
- Tracking Code Position: is what’s recommended by Google.
- Track Logged In Admins: you don’t want admin visits in your analytics data.
- Adjusted Bounce Rate: – this is recommended by the Perfmatters developers.
- Enable AMP Support:
This is found under Tools → Database.
Most cache plugins do this already so there’s usually no need for this. But as a bonus tip, I recommend installing WP-Optimize every so often which lets you go through your actual database tables and remove junk left by old plugins. Especially if you install/delete plugins constantly, they can leave behind tables. Also lookout for certain plugin features/modules causing database bloat (some plugins are module-based and let you disable certain features).
What Do You Think? Is Permatters Worth It?
I think so.
I still have it installed on top of FlyingPress.
It goes way beyond removing unused CSS/JS and has many features which can help with different parts of speed optimization/web vitals. Let me know what you think in the comments!