The Ideal Perfmatters Settings – How To Configure It To Optimize “The Last 10% Of Speed” Most Cache Plugins Don’t (Updated 2022)

Perfmatters addresses many optimizations most cache plugins don’t.

Even though most people use it to remove unused CSS/JS with the script manager, it has other features that can improve core web vitals and real-world browsing experience. It can remove unused CSS (1-click setting), preload critical images to improve LCP, delay JavaScript, remove bloat, limit post revisions/autosaves, and host fonts/analytics locally. Kinsta also updates the plugin frequently. I like to say it finishes the last 10% of speed most cache plugins don’t handle.

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.

  1. General
  2. Assets
  3. Preloading
  4. Lazy Loading
  5. Fonts
  6. CDN
  7. Analytics
  8. Database

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.

Perfmatters settings

 

1. General

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.

 

2. Assets

JavaScript

  • Script Manager: ON – lets you edit pages/posts to remove unused CSS/JS (see below).
  • Defer JavaScript – most cache plugins already do this. Deferring JavaScript fixes the render-blocking resources item in PageSpeed Insights and can also include jQuery.
  • Delay JavaScript: – again, most cache plugins already do this. If not, enable it, then add non-critical JavaScript files loading below the fold while setting the delay timeout.
  • 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.
  • Delayed Scripts: add a list of JS files you want delayed. This is often done with Google Analytics, Tag Manager, AdSense, Facebook Pixel, and other third-party code which you can find in your PSI report. You can also delay specific plugins loading below the fold. Perfmatters has instructions for delaying certain types of files. They explain how to delay common third-party code, inline JavaScript, and why you can defer/delay simultaneously. Read the documentation! Feel free to also check out this list of common JF files to delay.
  • Delay Timeout: amount of time to delay JavaScript. I found that you usually have to do it for about 4s (or more), otherwise you may not see as good of results in some speed tests.

Using The Script Manager

Once the script manager is enabled, view any page/post and it will be in the admin bar.

Script manager tab

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.

Perfmatters script manager

Examples

  • 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).

CSS

  • Remove Unused CSS:
  • Stylesheet Behavior:
  • Clear Unused CSS: use this if you make design/code changes and aren’t seeing them.

 

3. Preloading

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 Monitoringonly 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.

 

5. Fonts

  • 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.

 

6. CDN

  • 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.

 

7. Analytics

  • 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:

 

8. Database

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!

Asset-cleanup-vs-perfmatters

Cheers,
Tom

About Tom Dupuis

Tom Dupuis writes WordPress speed and SEO tutorials out of his apartment in Denver, Colorado. In his spare time, he plays Rocket League and watches murder documentaries. Read his bio to learn 50 random and disturbing things about him.

5 thoughts on “The Ideal Perfmatters Settings – How To Configure It To Optimize “The Last 10% Of Speed” Most Cache Plugins Don’t (Updated 2022)

  1. I am using Wp Rocket to generate critical css, and use Perfmatters to remove assets. It looks like that Perfmatters’ “Remove Unused CSS” is more powerful and functional, do you think it is a good idea to use it instead of Wp Rocket’s?

    Many plugins have same functions, confused which plugin has better results.
    Thanks in advanca

  2. I’m utilizing Jetpack and Sumome both free form. I discovered Sumome diminishing rate however again introduced for email. I’m an amateur. Would it be advisable for me to uninstall these 2 modules? I discovered websites recommending to utilize Jetpack. Just introduced WP Disable and designed glancing in your post. Much obliged. Would you be able to send an answer through email?

    1. Haven’t used Sumo but yes, JetPack can slow down your site and I would advise against using it. WP Disable is good but if you can, try and use another plugin for bloat removal like Perfmatters or Asset CleanUp.

  3. It’s a great plugin because it’s super lightweight and gets better every year. I am starting to clearly favor it over other plugins because of the great and committed devs behind it who know a lot about optimization without bloat.

Leave a Reply

Your email address will not be published.