When testing your site with the Google PageSpeed Insights tool you may have noticed that the results may vary over time. In this guide, we’ll go over this tool and explain why it might fluctuate over time, then explain what this means for a webmaster.
- How Do I Run a PageSpeed Insights Test?
- What Data is Being Collected/Reported?
- Case Study – PageSpeed Fluctuations Over Time
- Why Does the Data Fluctuate?
- What Does This Mean for the Webmaster?
How Do I Run a PageSpeed Insights Test?
Run a Manual Test
You can go to the official PageSpeed Insights page and run tests manually with the following steps.
- Access the PageSpeed Insights tool here:
- Enter the URL of the page you want to test in the blank field.
- Click the Analyze button.
You will then see the results of the tests, we’ll go over the data that will be provided in the next section.
PageSpeed API Test
If you are familiar with coding PHP, you can also perform PageSpeed tests using their API. You can view the official PageSpeed API documentation here:
What Data is Being Collected/Reported?
When you run a report, you will be able to review the results based on whether visitors are experiencing your site over Mobile or Desktop. You can click the buttons on the top to toggle between the different results.
In the first section, you will see “Discover what your real users are experiencing” and some metrics listed. This data is collected from real user data collected over a 28-day period and will not fluctuate.
In the second section, you will see “Diagnose performance issues” and below there will be a performance score and the results of a current test.
Since this score is generated at the point of testing, the results can vary based on several factors. Each of these metrics has a different weight that is used to determine the overall performance score. Here is a breakdown of the factors along with the percentage that will affect the final performance score.
- First Contentful Paint – 10%
- This metric scores how many seconds it takes before visitors see the content on your site (images and text).
- Time to Interactive – 10%
- This is how many seconds it takes before your site responds to visitors’ input, such as clicking or typing within a page.
- Speed Index – 10%
- This measure how many seconds it takes before your site van be viewed by a visitor.
- Total Blocking Time – 30%
- This measure the time between the FCP and TTI and is reported in milliseconds.
- Largest Contentful Paint – 25%
- This tests how long it takes for the biggest section of your site to load. It uses this data to determine how long it takes your site to load most of the page.
- Cumulative Layout Shift – 15%
- You want this score to be low since it is a metric that determines how often elements of your site shift or change and jump around unexpectedly.
Now, we’ll track mobile and desktop PageSpeed scores over a period of time in order to outline how fluctuations can occur.
Case Study – PageSpeed Fluctuations Over Time
In this example, we’re going to test the same site over several days and record the results, then map them out in order to illustrate how the scores can change over time.
Data Collection Results
Here are the results of the desktop and mobile data that we collected.
You can see a clear fluctuation in PageSpeed scores even when the tests are performed within a similar frame of time.
Desktop Performance Score
Notice how the performance score drops when the metric times increase. This shows a direct correlation between the two.
Mobile Performance Score
Like the desktop data, you can see the correlation between the performance score dropping and the times increasing.
While testing our site, we noticed that the data can be very volatile and greatly differ over time. There are several factors that can affect this, we will go over them in the next section to explain why data fluctuates.
Why Does the Data Fluctuate?
There are quite a few factors that can affect the performance of your PageSpeed test, these are the major ones.
Server Load at the Time of Testing
When running a large website there can be many things occurring at the same time, here are some examples of tasks that can affect the performance of your server load.
- Cron jobs running
- Cron jobs can be used to schedule tasks to run on a set schedule. This can trigger tasks that use up the website’s resources and slow response times.
- Marketing tests
- Different tests (such as A/B) may be set up to occur at specific times causing different results.
- Advertisements may be set to rotate and display at different intervals resulting faster or slower load times, based on the specific ads.
- Incremental backups
- Backups could be scheduled to run at different intervals, resulting in more load on the server. Especially with larger sites, this can affect the overall performance of the website.
- Database queries
- Depending on the site, some tasks may trigger database queries which can take time to run and process, affecting the overall performance and load of the site.
The path the PageSpeed test takes to your server can vary depending on how it is routed and this can change over time. For example, a longer route could result in longer response times and lower scores on the PageSpeed tests.
When your site has a large influx of traffic it can put a heavier load on your website and affect its response/load times. As we saw in the last section, slower response times result in a lower overall performance score.
What Does This Mean for the Webmaster?
Due to these normal fluctuations in PageSpeed score, it is ideal to test over time and average out the score. In this section, we’ll go over some tools you can use to troubleshoot and optimize your site and increase PageSpeed scores.
Review Opportunities & Diagnostics
The PageSpeed results page will list Opportunities that can be addressed in order to improve your scores and you can also review the results of the Diagnostics listed.
Use the Lighthouse Scoring Calculator
Google provides a tool for testing different score changes and seeing how they will affect your overall Performance score. You can utilize this tool to help you determine the best places to direct your efforts for the greatest improvements.
You can toggle between the Mobile and Desktop device options and move the sliders in order to see different score options.
Benchmark Your Site
There are many options for benchmarking sites to determine how much traffic/HTTP requests the server can handle. This can be used to determine whether your server will be able to manage the amount of traffic you plan to receive. Here are some of the most common ways.
- How to Stress Test Your Website With ab (ApacheBench)
- How To Load Test Your Site With k6
- How To Stress Test Your WordPress Site With Loader.io
Optimize Your Website For Speed
It’s important to optimize your website in order to get the best performance with the resources you have. Here is a guide to help you get started:
Upgrade the Server if Needed
Keep in mind that your hosting plan should match the amount of traffic and size of your website. For example, a basic Shared hosting plan may not be the best option for a large website with a high influx of traffic.
If your site is not performing the way you want after addressing the opportunities provided by the PageSpeed test, benchmarking, and optimizing, you may want to consider upgrading the server you are using.
Congratulations, now you are familiar with how PageSpeed scores can fluctuate over time and what this might mean for a webmaster.