How to Optimize WordPress Websites With Perfmatters

Right now, as you are reading this, it is almost a guarantee that your WordPress website is loading assets (CSS, JavaScript, etc.) on posts/pages even though those assets are not even in use.

As just one example, a lot of people use the Contact Form 7 plugin, which loads CSS and JS on every post/page of a website.

This guide will show you to use Perfmatters to increase the performance of your website, by stripping out assets that are loading unnecessarily, reducing HTTP requests, minimizing back-end component loading, and more.

Options > General

Disable Emojis

  • Element Description: Emojis are essentially icons that can be added to websites. While these can be cute, they are a slight performance hit.
  • Recommendation: Toggle ON.

Disable Dashicons

  • Element Description: These are the official WordPress core admin icons and are not needed on the front-end of your website.
  • Recommendation: Toggle ON.

Disable Embeds

  • Element Description: Embeds make it easy to place a video into a post or page, using the WP editor, by simply pasting in the link/URL.
  • Recommendation: Toggle ON.

Disable XML-RPC

  • Element Description: XML-RPC allows users and solutions to publish content to a WordPress website, without directly logging in.
  • Recommendation: Toggle ON.

Remove jQuery Migrate

  • Element Description: jQuery Migrate allows the JavaScript library to preserve compatibility with jQuery code used in older themes and plugins.
  • Recommendation: Toggle ON.

Hide WP Version

  • Element Description: Pretty simple one here. There is no need to include the version of WordPress in your website’s code.
  • Recommendation: Toggle ON.

Remove wlwmanifest Link

  • Element Description: This link is only needed if you use the Windows Live Writer, which most people don’t these days.
  • Recommendation: Toggle ON.

Remove RSD Link

  • Element Description: Similar to XLM-RPC, this is only needed if you edit your website using methods other than your browser.
  • Recommendation: Toggle ON.

Remove Shortlink

  • Element Description: Shortlinks are only helpful when the “Plain” permalink structure is used, and website owners should not be using this structure. 
  • Recommendation: Toggle ON.

Disable RSS Feeds

  • Element Description: These can be useful for websites that have an active blog, allowing people to subscribe to new content.
  • Recommendation: Toggle ON unless you have an active blog.

Remove RSS Feed Links

  • Element Description: Similar to how WordPress generates RSS feeds, it also generates RSS feed links for your pages/posts, comments, tags, etc., but you can leave your RSS feeds enabled and still remove the RSS feed links which typically amount to unused code.
  • Recommendation: Toggle ON.

Disable Self-Pingbacks

  • Element Description: Essentially this amounts to nothing more than a waste of resources, as pingbacks are mainly used by spammers.
  • Recommendation: Toggle ON.

Disable REST API

  • Element Description: There are solutions that use the REST API, like WooCommerce, Contact Form 7, and Gutenberg.
  • Recommendation: Toggle ON and disable for non-Admins.

Remove REST API Links

  • Element Description: By default, the REST API drops a link into the header of your website for API discovery purposes, which essentially amounts to unnecessary code on the front-end.
  • Recommendation: Toggle ON.

Disable Google Maps

  • Element Description: If you have a website where Google Maps are added, there will be associated assets loaded on your website.
  • Recommendation: Toggle ON unless you are using Google Maps.

Exclude Post IDs

Let’s say you want to use Google Maps on a particular post or page, but nowhere else. That is where this feature really comes in handy.

Disable Password Strength Meter

  • Element Description: WooCommerce has an integrated Password Strength Meter that forces users to use strong passwords and is a performance hit on your website. Depending on your WooCommerce settings (WooCommerce > Accounts & Privacy > Account Creation), this element may not come into play at all.
  • Recommendation: Toggle ON if you are not allowing users to create their own password.

Disable Comments

  • Element Description: Depending on the website, allowing comments may make sense (i.e. user engagement) and/or be required as a dependency for another part of the website (e.g. Ratings/Reviews). However, it’s not uncommon for website owners to disable comments so as to not worry about SPAM, comment moderation, etc.
  • Recommendation: Toggle ON unless you need/want to allow comments.

Remove Comment URLs

  • Element Description: Depending on how a website is set up, a visitor may be able to link out to their own website and while these links are nofollow (i.e. Google ignores them), visitors might leave comments solely for the purpose of getting this link.
  • Recommendation: Toggle ON.

Add Blank Favicon

This can be ignored, as this is more to do with temporarily getting better performance scores, which isn’t reflective of real website performance.

Remove Global Styles

As of WordPress 5.9, additional inline code was added to improve duotone styles (CSS and SVG code). Most users probably won’t be using this feature, and the problem is that this adds 311 lines (unminified) of code to every page of your WordPress site.

Disable Heartbeat

  • Element Description: The WordPress Heartbeat API generates AJAX calls, which can cause high CPU usage and a significant number of PHP calls, and if you leave your WordPress dashboard open for example, WordPress will keep sending POST requests to the admin-ajax.php file, every 15 seconds.
  • Recommendation: Toggle ON and only allow when editing posts/pages.

Heartbeat Frequency

  • Element Description: The WordPress Heartbeat runs every 15 seconds by default.
  • Recommendation: Set to 60 seconds.

Limit Post Revisions

  • Element Description: Every time you save a post/page, WordPress creates a new, saved version for rollback purposes, and while this is a great feature, WordPress does not place a limit on revisions by default, which is bad news for your database if you don’t get this under control.
  • Recommendation: Set to 10 revisions.

Autosave Interval

  • Element Description: WordPress automatically saves a draft every 60 seconds, by default, but you may prefer to increase the interval to prevent the browser from “hanging” and to reduce the number of writes to the database.
  • Recommendation: Set this to 5 minutes.

Options > Login URL

Custom Login URL

  • Element Description: If the default WordPress login URLs are not changed, it’s one less thing that “hackers” need to attempt to guess and bots will be able to constantly hit your WordPress login pages.
  • Recommendation: Set this to a random, complex value as this is something you should never need to memorize (i.e. you’ll bookmark it) and it will be transparent to your users.
  • Tip: Be sure to exclude your new, custom Login URL from all levels of your caching (CDN, server, plugins, browser, etc.).

Disabled Behavior

  • Element Description: This allows you to display a message, show your 404 page, or redirect to your Home page.
  • Recommendation: Use the default option unless you have a reason not to.

Message

  • Element Description: This is where you can specify the message that gets displayed if you have the option turned on under ‘Disabled Behavior’.
  • Recommendation: None.

Options > WooCommerce

If you are running a WordPress website that does NOT use WooCommerce, you can safely toggle ON all of the following in order to increase performance.

Disable Scripts

  • Element Description: WooCommerce loads scripts and styles on every page of your WordPress site by default, whether they are needed or not.
  • Recommendation: Toggle ON but test thoroughly.

Disable Cart Fragmentation

  • Element Description: This feature is used by WooCommerce to update the cart totals without refreshing the page (AJAX).
  • Recommendation: Toggle ON but test thoroughly.

Disable Status Meta Box

  • Element Description: By default, WooCommerce loads a status meta box (widget) in the WordPress dashboard that often goes unused, and while it can be hidden using Screen Options, it’s better to disable it to speed up the admin area.
  • Recommendation: Toggle ON but test thoroughly.

Disable Widgets

  • Element Description: WooCommerce by default comes with a lot of widgets installed that often go unused (themes typically have their own code to display products) and they can add load times to both the back-end load and front-end if they are used in sidebars or footers.
  • Recommendation: Toggle ON but test thoroughly.

Options > Assets > Script Manager

This feature allows website owners to strip out assets (CSS and JavaScript/JS) that themes and plugins are loading on posts/pages unnecessarily.

Script Manager can be accessed using one of the methods listed below.

  • From the back-end, by hovering over a post/page and choosing Script Manager.
  • By appending “?perfmatters” to any URL while logged into your website.
  • From the back-end or front-end, by pulling up a post/page and using the WordPress admin bar. (Note: Even if you have the admin bar disabled for your admin account, appending “?perfmatters” will invoke it, so again, it’s important to work in incognito mode.).

Script Manager > Default Settings

When you have the Scripts Manager options open, you’ll see a ‘Settings’ menu item on the left-hand side of your screen, and these are the default settings you will see the first time you use Script Manager.

optimize mylisting websites perfmatters script manager defaults

Display Archives

This setting allows you to get more granular with how you apply Script Manager settings to posts, such as targeting particular categories, tags, etc., but in most cases, getting this granular is not needed.

optimize mylisting websites perfmatters plugin script manager display archives

Display Dependencies

  • Element Description: Gives a really have a nice picture of which plugins, widgets, etc., depend and/or rely on each other to function properly.
  • Recommendation: Toggle ON.

Testing Mode

  • Element Description: This allows you as the admin, to work on your LIVE website and see your changes on the front-end, without your end users seeing anything you might be changing/breaking, as you work through the testing process.
  • Recommendation: Toggle ON.
  • Tip: Be sure to toggle this setting OFF, when you’re done using it, as it does place a very small overhead on performance. This is another argument for still using a Staging environment when getting your Script Manager settings dialed in.

MU Mode

  • Element Description: Some themes and plugins are coded in such a way that optimization plugins cannot see them without some extra work, and this feature brings them all to the surface.
  • Recommendation: Toggle ON.

Hide Disclaimer

Once you’re familiar with the disclaimers that Perfmatters communicates, you can toggle this on to prevent one more thing from loading.

Reset Script Manager

Hopefully, you’ve thoroughly tested your website as you’ve gone along with Script Manager, but if you haven’t and you’re completely lost, this option can quickly get you back to a clean slate.

Script Manager > Global View

When you have the Scripts Manager options open, you’ll see a Global View menu item on the left-hand side of your screen, and if you click on that menu item, it will show you a global view of everything you currently have set.

Each post or page is identified by its ID, which is also hyperlinked, so you can quickly see which post/page is being referenced.

optimize mylisting websites perfmatters plugin script manager global view

Script Manager > Loading Options

Turn Off Loading Completely

This option is the easiest to use and I recommend it over any other whenever possible.

In short, if you know that a theme (child theme) or a plugin is not used at all for a particular post/page, simply toggle it OFF entirely, within Script Manager.

When toggling OFF a theme or plugin you will then have the options to choose ‘Everywhere’, ‘Current URL’, or ‘Regex’, and I cover these options within this guide.

Once you toggle the theme or plugin off, all of the individual CSS and JS settings will disappear, as shown in the before and after screenshots below.

optimize mylisting websites perfmatters plugin script manager
optimize mylisting websites perfmatters plugin script manager toggle off plugin

Turn Off Loading Selectively

Let’s say that you need the theme or plugin to load, but there is some CSS or some JS that’s not needed.

Rather than toggling the theme or plugin off completely, you can selectively choose what elements should load.

In the screenshot below, we are hypothetically saying that we don’t need the CSS to load for Contact Form 7, so we toggle off that particular asset.

optimize mylisting websites perfmatters plugin script manager toggle off plugin selectively

Script Manager > Disabling Options

Disabled Everywhere

This option is a bit more complex but does allow the most granularity in terms of settings, and is the fastest way to apply Script Manager settings across your entire website.

Whatever you set with the ‘Disabled Everywhere’ option has the potential to become a global setting for your entire website, depending on what exceptions you make.

Exceptions
  • Current URL: Don’t apply to the page I’m currently working on/from.
  • Post Types: Don’t apply to posts, but apply to all other post types.
  • Regex: Don’t apply to any pages with the word “explore” in the URL.

Current URL

I cover this option in previous sections, but in short, this option simply says to disable assets from loading on the current URL (post/page) that you are currently optimizing with Script Manager.

Regex

Let’s say you have a page (e.g. ‘Explore’), as well as pages for each corresponding neighborhood you service.

Rather than optimizing each page one by one, you can target all of the neighborhood pages in one shot, and this is done using the ‘Regex’ option of Script Manager.

Regex option allows you to target all posts/pages with a certain word in the URL.

For example, let’s say that every neighborhood page includes the word ‘explore’, and you have a plugin that doesn’t need to load at all on those pages.

Using Script Manager, you can toggle OFF the entire plugin by choosing the ‘Regex’ option and entering ‘(explore)’ as the value.

optimize mylisting websites perfmatters plugin script manager regex example

Options > Assets > Javascript

Defer Javascript

At this point, Script Manager has allowed you to stop the loading of unnecessary Javascript on your website, and now you want to turn your attention to the Javascript assets that must remain.

I recommend you toggle ON the ‘Defer Javascript’ option and thoroughly test your website, ensuring to always clear caching at every level (CDN, server, plugins, browser, etc.) as part of the testing process.

Troubleshooting Deferring

One of the quickest ways to test if what you’re deferring is causing an issue, other than visual front-end inspection, is to inspect your posts and pages in your browser and look for errors in the inspect console.

If you think that deferring is causing an issue, Perfmatters makes it easy to toggle on or off deferring on a per post/page basis.

To do that, simply edit the page in WordPress and use the sidebar toggles for Perfmatters.

optimize mylisting websites perfmatters plugin defer js testing sidebar toggle

Include jQuery

This setting will be exposed when/if you toggle ON ‘Defer JavaScript’.

jQuery core is something I don’t recommend touching, as the juice (i.e. faster loading potential) ain’t worth the squeeze (i.e. the headache potential).

Exclude From Deferral

If you notice any issues with the ‘Defer JavaScript’ option turned on, simply identify the name of the script and add it to the ‘Exclude from Deferral’ box.

optimize mylisting websites perfmatters defer javascript

Delay JavaScript

While defer JavaScript pushes the script to the bottom of the page load, you can instead delay JavaScript based on user interaction.

This can be a great way to speed up the paint of the page when something isn’t needed right away, especially heavy third-party scripts like Google Adsense, conversion pixels (FB, Google Ads), etc.

Where ‘Defer JavaScript’ pushes everything towards the bottom of the list of assets to load, ‘Delay JavaScript’ delays the loading of JavaScript files until there is a user interaction (e.g. moving the mouse over the page, touching the screen, scrolling, pressing a key).

You should only delay JavaScript files that are not required to display anything “above the fold”.

Delay Behavior

There are a couple of ways to go about this and you have to decide the right method for you, based on your comfort level with delaying scripts. My personal preference is to ‘Delay All Scripts’ and go from there.

Either way you go, it’s important for you to do thorough testing of your website’s design and functionality after you make changes in this area.

Only Delay Specified Scripts

With this option, you must know exactly which scripts you would like to delay, and identifying these can be difficult for some. This is the safest option for delaying scripts, but you might also miss out on some performance opportunities by not delaying more scripts.

Delay All Scripts

Rather than needing to go one by one and identify scripts that can be delayed, this option will delay them all in one shot, as the name suggests. Depending on the website, this may be the best route. Meaning, if you toggle this option ON and everything looks and functions properly, you’re “done”.

I say “done”, because like anything related to performance optimization, you’re never really done. Every solution (plugin, theme, app, etc.) that you introduce into your environment could cause you to rethink and/or adjust your delay strategy.

If you decide to delay all scripts, but you identify some issues, you can use the ‘Excluded from Delay’ option to fine-tune which scripts are not included as part of the delay process.

Delay Timeout

You can set a timeout that will load scripts after a set amount of time (between 1 and 10 seconds) if no user interaction has been detected.

Once you toggle on this setting, Perfmatters will default to a delay time of 10 seconds, which is recommended.

If you want to set a different delay timeout value, you can use the perfmatters_delay_js_timeout filter.

Delay Timeout Examples

  • Improve data accuracy of tracking scripts, especially if you have a goal associated with a pageview, but maybe no user interaction. You still want the goal to trigger.
  • You have a Google AdSense blog, and a user is opening up multiple pages in new tabs in the background. You still want the ads to fire off.

Options > Assets > CSS

There are times when CSS is being loaded by a plugin or theme that isn’t needed or used on a particular Post, Page, Listing, etc.

Developers typically only pull in a stylesheet if it’s being used, but there are times when extra styles that might not be needed are also pulled in.

This results in a lot of unused CSS, which adds to the slow down of your website and triggers render-blocking warnings.

Recommendations

Prioritize Script Manager

I recommend ensuring you’ve done all you can at the Script Manager level, in addition to using the ‘Remove Unused CSS’ feature.

It’s better to completely stop CSS styles from being called up, to begin with, rather than call it up and try to optimize it after.

Before Using This Feature

  • Remove any existing CSS preloads you have set up in Perfmatters (excluding Local Google Font stylesheets).
  • Uncombine your CSS. Combining CSS is a deprecated optimization technique since HTTP/2. In some cases, combining your CSS can actually hurt your performance.
  • Make sure you aren’t already trying to remove unused CSS with another plugin.

Remove Unused CSS (BETA)

  1. Remove Unused CSS > Toggle ON.
  2. Save Changes.
  3. Test by viewing a couple of your Posts, Pages, Listings, etc.

Note: I recommend waiting on this setting until this is removed from BETA.

Clear Used CSS

There will be times when you need to clear your used CSS, like when you redesign a page or add a new element to a page. 

To clear the Used CSS, simply click the ‘Clear Used CSS’ button.

Options > Assets > Code

These options can not only help to remove unnecessary plugins, but also provides an easy way to add scripts to your WordPress website.

On client websites, I often see the plugins whose sole purpose is to add scripts to a website, but with Perfmatters, those plugins are no longer needed.

Add Header Code

Code added here will be printed in the <head> </head> section on every page of your website.

Add Body Code

Code added here will be printed below the body section on every page of your website.

Add Footer Code

Code added here will be printed above the section on every page of your website, and this option produces the best performance, so always place scripts in the footer of your website unless you notice any issues.

Options > Preloading

Enable Instant Page

This one is a no-brainer feature to turn on, as it lets users automatically prefetch URLs in the background after they hover over a link, resulting in almost instantaneous load times.

Note: Turning this on will not show improvements when measuring website performance with tools like Webpagetest.org, so don’t beat yourself up running test after test for this item.

Preload

This can be useful for resolving errors like ‘Preload key requests’ and ‘Render-blocking resources’, but overall, this can largely be ignored unless you have a special use case.

Preloading should only be used for resources (web fonts, CSS, and JS) that are needed immediately, so they are loaded in a non-blocking manner (i.e. loaded immediately or very shortly after a page load).

Preconnect

Preconnect picks up where the DNS Prefetch analogy leaves off.

Meaning, rather than Google Maps just storing your address, it actually starts mapping out the directions in the background.

So, when you’re ready to start your navigation, the route is already mapped out.

Everything I  documented for DNS Prefetch applies here, as far as how to determine what domains to target, caution targeting too many domains, etc., with the only difference being the underlying process. 

When in doubt, I recommend using DNS Prefetch over Preconnect, due to the potential performance hit that comes from “missing” on preconnect attempts.

DNS Prefetch

A simple way to think of this feature is to think of how Google Maps works on your phone.

Rather than enter your home address each time as the return destination, Google stores your address for you, to help speed up the process.

This is what DNS Prefetch does, which is to say it stores the addresses (domains) that you anticipate visiting often, to speed up the lookup process.

Unlike Google Maps, these entries are manual, but you just need to enter them once.

So, how do you know which domains to prefetch?

Using Webpatetest.org, you can use the ‘Waterfall’ tab, and sort the entries using the ‘Domain’ column.

Any domain listed, other than your own, is a good candidate to be prefetched since your website is calling for it.

However, the only domains we want to prefetch are those that load early on the page loading process, causing possible contention with the other elements loading on the page. 

Determine the Domains to Prefetch

  1. Run Webpagetest.org against your website and browse to the Waterfall tab.
  2. Click on “CSS” and “JS” to filter out all other elements.
  3. Scrolling top to bottom, identify any domain other than your own, that has activity starting before the green line.

Note: Once you get towards the bottom of your Waterfall, the need to DNS Prefetch the domains isn’t needed.

Looking at the image below, we see analytics.js, sdk.js, etc., start to load and the only elements loaded below it are more scripts and a non-critical style (CSS).

Long story short, loading scripts at the end is preferred/optimal, so we can just let these be.

optimize mylisting websites perfmatters gtmetrix waterfall dns prefetching

Avoid the "Double-Fetching" of Domains

Depending on your theme or plugins, the developers may have already coded the software to DNS Prefetch the domains they know will be called upon.

When I viewed the source code (Chrome > Right-click on the page > View Source Code) of the Explore page, I saw the following domains already being prefetched.

  • api.tiles.mapbox.com
  • apis.google.com
  • fonts.googleapis.com
  • maxcdn.bootstrapcdn.com (Font Awesome)
  • s.w.org (WordPress.org)

The only domain missing from the list of domains already being prefetched was for Calendly.

I included that domain by adding it to Perfmatters and prepending “//” in front of it.

  • //assets.calendly.com

An exception to the rule is those using true CDNs, would want to include their CDN domain (//cdn.cdn-domain.com) in their DNS Prefetching list.

IMPORTANT: This is not set it and forget it, because as your solutions and settings change, you will most likely need to adjust your DNS Prefetch entries, as you don’t want your server making calls when it’s not necessary.

For example, if you decide to not use Google Fonts, you want to stop prefetching that domain.

Options > Lazy Loading

Images

  • Element Description: This is delaying the loading of images until a user scroll downs the page and the images come into view.
  • RecommendationToggle ON as long as you are not using lazy-loading functionality from other plugins.

Exclude Leading Images

The goal with this setting is to exclude your ‘above the fold’ (i.e. those in the immediate viewport) images from lazy loading, thus preventing image viewing issues and keeping your website in better graces with search engines.

How many images you can exclude depends from website to website. Maybe it only makes sense to exclude one image, such as your logo, assuming you are using an image for your logo (in the header) and not a text-based logo.

Maybe it makes sense not to exclude any images in cases where you don’t use a traditional logo in your header and don’t have many images above the fold. I built the WP Turned UP website in a way that allows me to go this route.

iFrames and Videos

  • Element Description: This is delaying the loading of iFrames and videos until a user scroll downs the page and either of these elements come into view.
  • Recommendation: Toggle ON as long as you are not using lazy-loading functionality from other plugins.

YouTube Preview Thumbnails

  • Element Description: If you’re using YouTube videos on your site, this swaps out the YouTube iframes with a preview thumbnail and lightweight SVG play icon, providing the fastest way to load YouTube videos.
  • Dependency: Requires the iFrames and Videos option to be Toggled ON.
  • Recommendation: Toggle ON as long as you are not using lazy-loading functionality from other plugins.

Exclude From Lazy Loading

Excluding an element from lazyloading is as easy as adding the source URL of the element to this area of Perfmatters, one per line.

Getting the source URL of an element, like an image, is as easy as viewing the image in your WordPress Media Library and copying the file name (e.g. wp-turned-up-logo.png.).

  • Element Description: There may be times where you will want to exclude a specific image from being lazyloaded and this is where you would do that.

Threshold

This is the setting I would use only when I’m not able to make it work the way I want with the ‘Exclude Leading Images’ option.

If you had more than 5 images (the maximum setting for ‘Exclude Leading Images’) above the fold all throughout your site (I wouldn’t advise this), you could use the ‘Exclude From Lazy Loading’ instead to capture all of those images above the fold.

So, for example, let’s say you had 6 images appearing above the fold, within the first 500px of your page in the viewport, you would only be able to exclude five of those six images from lazy loading.

Instead, you could use a ‘Threshold’ setting of 500px, to lazy load all six of those images.

DOM Monitoring

  • Element Description: Watches for changes in the DOM (i.e. structure of your web pages/posts) and dynamically lazy loads newly added elements, to improve compatibility for third-party plugins and themes that utilize infinite scrolling.
  • Elementor Notes: Elementor also does not include infinite scrolling out of the box either, but third-party plugins for Elementor can provide that functionality, and DOM Monitoring would be beneficial when/if those are used.
  • General Notes: If you use any plugin that provides infinite scrolling, you could benefit by using DOM Monitoring.
  • Recommendation: Toggle OFF.

Add Missing Image Dimensions

Modern browsers set the default aspect ratio of images based on their width and height attributes and if your images are missing these attributes, it can cause layout shifts, which trigger CLS warnings in Core Web Vitals. This is because image elements do not have explicit width and height.

If you happen to also be using a plugin like WP Rocket, this setting is in that plugin as well, so just be sure you are not duplicating functionality by enabling it in both places.

CSS Background Images

Perfmatters supports lazy loading inline background images by default, but sometimes vendors (e.x. Elementor) load background images within CSS stylesheets.

In situations like this, you cannot use Perfmatters to change the contents of the CSS, but you can use it to prevent certain containers from immediately loading their background image in the browser.

So, if you routinely place background images below the fold of your content, it’s worth identifying whether you can lazy load those backgrounds.

Options > Fonts

Disable Google Fonts

Options > CDN

If you happen to be using Cloudflare as your CDN, this section can be skipped entirely.

On the other hand, if you are using a CDN like KeyCDN, StackPath, CDN77, etc., Permatters makes it easy to rewrite the root URL of static assets, including images, CSS files, and JavaScript files.

  1. Enable CDN Rewrite: Toggle ON.
  2. CDN URL: Your CDN provider should be able to provide you with your CDN URL (https://cdn.yourdomain.com).
  3. Included Directories: By default, the wp-content and wp-includes folders are included and you can enter additional directories to be included in CDN rewriting (separated by commas) but the defaults are typically all that’s needed.
  4. CDN Exclusions: By default, .php files are excluded and you can enter additional assets to be excluded (separated by commas) like .xml files which I recommended adding to your exclusion list if you are using SEO plugins like SEOPress, Rank Math, Yoast, etc.

Note: CDN Exclusions are highly dependent on the individual website, due to all of the different plugin combinations that can exist, so just keep this in mind if you are attempting to take advantage of this section and notice any issues.

Options > Analytics

Analytics needs can greatly vary for each business and if they are critical to the success of your business, please take the time to fully understand the settings under Perfmatters, and also have a look at the guides listed below.

Google Analytics for WordPress Websites
Google Tag Manager for WordPress Websites

Enable Local Analytics

  • Element Description: Hosting Google Analytics locally can help speed up your site by reducing extra DNS lookups while allowing you to load the analytics script over a single HTTP/2 connection, rather than multiple which can add to load time.
  • Recommendation: Toggle ON if utilizing Google Analytics.

Detailed Settings

For new businesses that have never used Google Analytics, I recommend jumping straight to v4 of Google Analytics with a new v4 profile.

For those already running an older version of Google Analytics, you can create a new profile for v4 and leave the old one in place for historical data purposes, which is what Google recommends. For this, your will set your ‘Script Type’ to ‘gtag.js’ and then able ‘Dual Tracking’.

Google Analytics v4 in Perfmatters can be hosted locally, just like the older version, and please note that each version uses a measurement ID structure.

Measurement ID Types:

Pre-V4: UA-XXXXXXXXX-X
v4: G-AAAAXXAAAA

  • Tracking ID: Enter your Tracking ID, using the correct measurement ID (UA- vs. G-).
  • Tracking Code Position: Footer. (Note: If you have a slow website, it may be better to choose the Header position to prevent issues with tracking accuracy, but you should not have a slow website if you are taking the time to follow guides like this one.).
  • Script Type: Choose the analytics script type that matches the primary script in use on your website. (Note: Please check out the analytics guides that we linked to above, for more information.).
  • Disable Display Features: Toggle ON. (Note: This is more on the advanced side, but if you are not actively working with the Advertising features of Google Analytics, this should be disabled.).
  • Anonymize IP: Toggle ON. (Note: This is more on the advanced side, but if you fall under GDPR governance, you’ll want to enable this.).
  • Track Logged In Admins: Toggle OFF. (Note: Not sure why this is even an option, as you should never track admin activity analytics-wise, as that would pollute your stats.).
  • Adjusted Bounce Rate: Enter 30 to set the number of seconds.
  • Use MonsterInsights: Toggle ON only if you use the MonsterInsights plugin.
  • Enable AMP Support: If you happen to use AMP on your website, you may benefit from this setting. (Note: AMP is a fad that came and went, so you may want to look into whether you really benefit from using it.).

Tools > Plugin

This section is pretty self-explanatory, but the ‘Purge Meta Options’ is important to mention.

Purge Meta Options

If you have gone through your website and set any of the options below on a per post/page or per asset basis and for some reason you need (or want to) start fresh, this is a great option.

Tools > Database

If you happen to be holding onto a plugin just for the purpose of keeping your database clean, Perfmatters can help you eliminate that plugin, simply by following the steps below.

  1. Open the Database section of Perfmatters.
  2. Toggle ON all settings. (Note: Do not enable the ‘Tables’ option when your websites are hosted with Kinsta, as this can do more harm than good. This feature is primarily used for MyISAM tables and hosts like Kinsta, convert your tables to InnoDB, which is better for performance.).
  3. Schedule Optimization > Weekly.
  4. Save Changes.
  5. Click ‘Optimize Now’ to kick off an immediate cleanup.

Note: Be sure to only run database cleaning operations using a single solution, so they don’t conflict with each other. WP Rocket and WP Optimize are examples of plugins that offer this same feature.

Video Tutorial