WordPress Performance Audit: 3 Steps to a Faster Site

In the battle for customers’ attention, speed wins. Faster sites rank higher in search engines, lower in bounce rates, and generally outperform their more sluggish counterparts. If your website is essential to your business, it needs to be as speedy as possible.

Simply put: making WordPress faster matters. WordPress is capable of serving millions of pages at scale, but only if it’s properly configured and maintained. Here’s how to assess your site’s speed, identify problem areas, and max out your performance.

Fast WordPress  

The Quickstart Guide to Fast WordPress
Fast WordPress performance is crucial to your business: A slow site can lower search rankings and turn off customers. Maximize your performance with this guide.

 

1. Test Your Site for Performance Issues

Before you start digging through settings and changing files, it’s important to get a baseline on your site’s current performance. Google has a trio of free tools that can provide useful insights:

  • Lighthouse runs in Chrome DevTools, and features multiple audits that generate reports and recommendations.

  • TestMySite specifically tests for mobile responsiveness. Since the majority of web traffic is on mobile, it’s vital to test that performance as well.

  • PageSpeed runs a battery of tests, simulating how your site loads on multiple types of devices.

These tests are great for a high-level indication of how your page performs compared to web standards. The reports they generate can be a useful tool to begin pinpointing and fixing problems.

You can further pinpoint the source of some performance problems with a monitoring tool like New Relic.

2. Fix Frontend Issues

The primary indicators for performance issues on the frontend are initial response time, “time to first byte,” and the time it takes to render content, “time to first paint.” If either of these metrics are slow, your site is likely to suffer in Google ranking and provide a negative experience for your users.

Evaluate the following elements of your page to give it a performance boost:

Caching

Hosting providers like Pantheon provide full-page caching, which stores a cached copy of the full HTML pages on your site to avoid having to render them with each user request. If your site doesn’t have a full-page cache, that’s the first step to improving performance.

If your site should be serving cached pages but requests are hitting the server instead, there are a few likely culprits. Pantheon’s guide to frontend performance has an in-depth walkthrough for eliminating cache busters.

Images

Image files are a great place to start optimizing for performance, since the fixes are simple and straightforward. Think of two guiding principles: 1) Send only as many pixels as you need, and 2) Send only as many bytes as you need.

For the first principle, look for instances where you have high-resolution images that are never displayed at full resolution. If your product photos are in a 1024x768 window, for example, you don’t need a 5000x5000 pixel source file.

For the second principle, consider reducing file sizes by using Scalable Vector Graphics (.svg) for items like logos and icons. As text files, they can be much smaller than their binary counterparts. For large images, try the progressive JPG format which gives you the benefit of compression that comes with baseline JPEGs while also incrementally loading for a browsers on a slow connections.

Also consider lazy loading your images. Lazy loading is a Javascript technique that only loads images when they appear onscreen, rather than loading the entire page at once. The BJ Lazy Load plugin brings this functionality to WordPress.

Javascript Libraries and Fonts

If you’re using a custom or unusual Javascript library or set of fonts, you may be adding extra load time to your page. The most popular libraries and fonts are likely to be already cached in your user’s browser, so sticking with the most common sets might keep users from waiting for these resources to load.

CSS and Javascript

Using common libraries and fonts will cut down on load time. You can further reduce the load by making your scripts for CSS and Javascript as compact as possible. Plugins like Autoptimize can help stitch scripts together and minify them for faster loading.

Before you take that step, though, it’s important to audit scripts and eliminate unnecessary or redundant objects. Eliminating redundancy will make your minifying far more effective than if you optimize without clearing out the junk you don’t need.

3. Fix Server-Side Issues

Frontend performance is all about getting a client browser to understand your webpage as quickly as possible. Server-side performance looks at the processes that generate the webpage  in the first place. New Relic is a useful tool for troubleshooting server-side issues, and a debugging plugin Debug Bar can help, too. The following three elements are likely culprits for server-side performance issues:

MySQL Queries

It’s simple to create a report of the longest-loading queries, but that data might not be the most useful for optimization. Queries that are complex by necessity will show up on the top of the list, but if they’re serving genuinely complex business requirements, they’re not a good candidate for optimization.

Look for queries that are complex but serve a simple purpose. See how simply you can describe the query in plain English, and let that description guide rewriting the way it executes. If the query results are likely to be static for long periods of time, consider caching the results. That way, your site doesn’t have to run the query every time the data is needed..

Even without analyzing any of your queries too closely you can benefit from an object cache. Plugins like wp-redis allow WordPress to load objects like posts and users from an object cache like Redis rather than going to MySQL to load them.

Plugins

As with queries, you can start evaluating by generating a list of slow plugins, or just reducing the number of total plugins. But you will see better results by auditing for redundancy and quality, not quantity. The total number of plugins does correlate to sites being slow, but that’s likely due to redundancy, not just the overall number.

It’s best to audit your plugin list manually, checking:

  • What each plugin does

  • Why it’s there

  • Whether it’s still needed

  • Whether anything breaks if it's removed

Third-Party Data

Calling out to 3rd-Party APIs can slow down the rendering of your site’s HTML. For example, if you have a plugin that pulls data from Twitter to show recent tweets, your site speed is now dependent on Twitter’s performance.

If you have to pull in 3rd-party data, it’s best to schedule a cron job that fetches the data. Then cache the data locally to keep your performance independent of that 3rd-party source.

Think Fast

WordPress performance is a process, not a single task or checklist. A performance audit can set you on the right path to keeping your site lean and fast. But don’t make it the end of your performance journey. To take the next step, check out our Quickstart Guide to Fast WordPress.

The right WordPress host can make a big difference in performance. Pantheon is built for speed: Create a free account and see for yourself.

WP enterprise  

Developer’s Guide to Frontend Performance
Learn how to ace an online speed test with Pantheon’s Global CDN in our comprehensive guide.

 

Topics WordPress Hosting, Speed & Performance, WordPress