Get Started

Hosting

Get Started

Service
Speed optimization with perfmatters

Speed Optimize Your WordPress Website with Perfmatters

What is Perfmatters?

Perfmatters is a lightweight web performance plugin used to speed optimize WordPress websites. It works mainly by disabling scripts that are not used on your site.

For example, by default, the emojis script load on every single page of your site. If you don’t use them, this is simply slowing it down. By disabling it, the script no longer loads, and so it reduces your overall number of HTTP requests and your page size.

I love Perfmatter and use it on all my sites. If you are hosting your site with WebLynx, you will automatically have Perfmatters setup and configured with optimal settings for maximal speed and performance.

What can you disable with Perfmatters?

There are a ton of options for you to disable unnecessary bloat on WordPress using Perfmatters. Not only does doing this increase your page loading speeds, it also saves server resources such as CPU, RAM and bandwidth as well as makes your site more secure.

Disable XML-RPC

This is an old API endpoint from before REST API. It is also a severe security risk to have it enabled and should absolutely be disabled unless you are sure you need it for some reason.

Remove jQuery Migrate

This is an old script that is not being used on modern installations. Unless you are using a very old theme or plugin on your site, I suggest you enable this option. And if you do have any of these ancient plugins, I suggest you find modern alternatives, as they are probably a security risk.

Disable RSS feeds

These are RSS feeds that WP creates for your blog. If you don’t use the blog function, or your users don’t follow you using RSS, you can disable them.

Disable REST API

The REST API is an endpoint for some external services, such payment gateways. If you are using such services, you cannot disable the REST API without breaking some functionality.

However, if you don’t, I suggest you set to ‘Disable for Non-Admins’ or ‘Disable When Logged Out’, depending on your needs. The reason is that having the REST API endpoint open to everyone creates some security risks. If you want to know more about this, read my post on how to secure your WordPress installation.

disable wordpress rest api perfmatters v3.png
Disable REST API options

Disable emojis, embeds, Dashicons

Disable unnecessary scripts and assets you might not be using on your site, such as emojis, embeds, Dashicons, etc.

Disable or limit post revisions

Disable or limit the number of post revisions that WordPress stores to keep your database from growing out of control.

Change autosave interval

Keep fewer auto-drafts by changing your autosave interval. It also decreases the annoying “there is a more recent version” warning.

Disable and tweak Heartbeat API

Heartbeat can cause high CPU usage and a crazy amount of AJAX calls. You can disable Heartbeat and also change the frequency.

Disable comments and URLs

No blog? Disable comments sitewide to reduce spam, or remove author comment links to stop people from just trying to get a backlink.

Disable Google Maps

Google Maps can wreak havoc on your site’s performance. You can disable Google Maps selectively, and only load it where you need it.

Disable WooCommerce cart fragments (AJAX)

The wc-ajax=get_refreshed_fragments request can cause huge delays on WooCommerce sites. Disable cart fragments on your site.

Perfmatters general options
Perfmatters general options

JavaScript optimization

Java scripts are CPU heavy, and optimizing these can have a huge impact on your page loading speeds. In Perfmatters, you can choose to either defer or delay your Java scripts, what you should choose depends on your set-up.

Deferring JavaScript means that your scripts will execute only after the page has finished loading, which is what you want in most cases. You can choose to defer inline scripts as well, which will help avoid some scripts failing to load because of dependency errors, so I recommend you enable this setting.

If you choose to delay JavaScript, your scripts won’t load until user interaction is detected. This can cause issues with elements such as sliders or analytics scripts and for this reason, I rarely choose to delay JavaScript.

Minifying JavaScript means you remove the empty spaces from the script files, making them smaller and faster to load. I recommend you enable this as it rarely causes any issues.

Always remember to test your website after you optimize the JavaScript settings to make sure everything is running correctly. Check your browser’s dev console for any errors during loading of the page.

Perfmatters JavaScript options
Perfmatters JavaScript options

CSS optimization

CSS optimization is something that will only slightly improve your page loading times, and because CSS are the instructions to the browser on how to style the page, enabling them can often break your pages.

The ‘Remove Unused CSS’ option is especially likely to break something on the page, so make sure you test thoroughly after enabling this. The CSS method can be either ‘Inline’ or ‘File’; inline CSS is better for page speed tests, but if you have many users, the file option will be faster.

You can also minimize your CSS stylesheets, which rarely causes any issues, so I recommend you do enable this option.

Perfmatters CSS options
Perfmatters CSS options

Preloading

Preloading is another optimization technique that can significantly include your page speeds. When you preload elements, they are put into memory, so the server doesn’t have to retrieve them from disk.

Preloading is especially useful for large hero images that are above the fold and cannot (should not) be lazy loaded. Loading heavy images above the fold can severely lower your LCP score on Core Web Vitals, so preloading these are your best choice.

You can also set the ‘Fetch Priority’ to high for your hero image, so that it is loaded before other resources. At the same time, enable the option ‘Disable Core Fetch’, which is a function WordPress uses to prioritize what image should be loaded first. In my experience, WP often chooses the wrong image for this, not the hero image you want.

‘DNS prefetch’ is used to do DNS lookups of external domains, so you don’t have to wait for the server to do these lookups during the loading of the page. ‘Preconnect’ will open a TCP connection to the external domain, but in most cases you won’t feel any tangible difference from adding these.

Perfmatters preloading options
Perfmatters preloading options

Lazy loading

Lazy loading your images below the fold is a no-brainer when you want to optimize page speed. Below, you can see the options I usually choose to enable.

The reason I exclude two leading images is that you don’t want to lazy load any images above the fold. I normally have two leading images there, the logo and the hero image. You can adjust this to your needs.

Perfmatters lazy loading
Perfmatters lazy loading

Fonts optimization

While it’s possible to build a website using standard system fonts, many choose to go with some of Google’s web fonts for a more aesthetically pleasing experience.

Google’s fonts are normally loaded from Google’s servers, and these 3rd party requests tend to increase page loading speeds. One solution to this is to load the fonts locally, and to do this is Perfmatters, all you have to do is enable the ‘Local Google’ Fonts option.

If you use local Google fonts, I also recommend you enable ‘Display Swap’ to make sure text is visible during loading of the fonts. Enabling ‘Load Asynchronously’ will help to avoid render-blocking issues, but if you enable this, you should also preload your fonts.

Perfmatters fonts options
Perfmatters fonts options

CDN rewrite

The CDN rewrite option allows you to use third-party CDN providers on your WordPress site. Rewrite means that it will automatically change all of your assets’ URLs on the fly to use the CDN URL. This way, your assets will load from all the global CDN POPs, instead of just your server.

Perfmatters CDN options
Perfmatters CDN options

Google Analytics optimization

Running Google Analytics on your website can provide you lots of useful insights, however it comes as the cost of loading heavy scripts that slow down your site.

One way of improving site speed is to load the scripts locally, instead of having to pull and load them from Google’s servers every time.

To do this, turn on the ‘Enable Local Analytics’ option in Perfmatters and add your GA4 tracking ID. You can choose to put the tracking code in either the header or footer of the page. Moving it to the footer should improve loading speed a bit, but the analytics scripts work more reliably when you put them in the header, which is also what Google recommends.

You can choose to go with the standard script, or a minimal, slimmed down version for tracking basic events only. If you have a simple blog website, the minimal version would be fine, but if you need more advanced analytics, I’d go with the default. As always, you can experiment and fine-tune for best results.

Perfmatters Google Analytics options
Perfmatters Google Analytics options

Include custom code

If you need to include any custom code snippets, you can do it under the code section. The snippets can be added to the header, body or footer of your pages.

Perfmatters code options
Perfmatters code options

Do you need help optimizing your WordPress website for maximum performance?

If you need help configuring Perfmatters, or speed optimizing your website, don’t hesitate to reach out. I offer a speed optimization service, you can even get a FREE audit of your site to find out how slow it is and what can be done to make it faster.

Leave a Reply

Your email address will not be published. Required fields are marked *