Remove unused JavaScript in WordPress

Most WordPress site owners will see the recommendation to “remove unused Javascript” when they run a PageSpeed test.

The technically complete solution is out of reach for most site owners, but there is an effective shortcut solution that I share below.

What does “remove unused JavaScript” mean?

JavaScript (JS) is a type of code used on website mostly for interactive elements like sliders, animations etc. Compared to CSS or images, it is much more resource intensive so it takes longer to process when your page is loading. It’s especially bad for mobile performance.

For best performance, you should aim to have as little JavaScript as possible on your site.

Loading JavaScript that isn’t even used on the page is a waste of resources and processing power, and that’s what this PageSpeed recommendation is getting at.

Read More

Improve the mobile speed of your WordPress site

If you’ve ever run a PageSpeed or other speed test for the mobile version of your site, you’ve undoubtedly been horrified by the low speed and score compared to the desktop version  of your site.

In this post I’ll explain:

  • Why mobile performance is typically worse
  • The primary cause of slow mobile pages
  • How to create mobile-specific versions of your pages
  • How to remove unnecessary files from your mobile pages

Optimizing for mobile does take a bit of extra effort since site owners are usually “retrofitting” their sites for mobile performance.

If you are starting a new site, it will be easier if you consider mobile performance from the start, and make it a priority.

Read More

How Will Google’s Core Web Vitals Affect Your WordPress Site?

Core Web Vitals are the 3 key metrics that Google believes indicate healthy performance for your web site.

Whether you agree with their selection of metrics or not, soon you will not really have a choice.

Unlike their previous PageSpeed metrics, which did not impact ranking at all, Core Web Vitals will eventually be used as a ranking signal.

Today, we’re building on this work and providing an early look at an upcoming Search ranking change that incorporates these page experience metrics. We will introduce a new signal that combines Core Web Vitals with our existing signals for page experience to provide a holistic picture of the quality of a user’s experience on a web page.

https://webmasters.googleblog.com/2020/05/evaluating-page-experience.html
Read More

What’s Making Our Websites Slow? We Are!

This is the blog post that accompanies a talk I gave at WordCamp Seattle in 2019. You can see the slides here. The video of the talk is up on WordPress.tv

Additionally, the HTTP Archive Web Almanac was published around the same time so I’ve also interspersed some of the insights from that report since they dovetail really nicely.

Providing excellent context for this post, the CMS chapter shows how sites built with a Content Management System (and WordPress sites comprise almost 75% of those in the report) tend to:

  • be more bloated with heavier page weights
  • use more 3rd party resources
  • use heavier images

Additionally it reported that WordPress sites tend to have slower performance metrics.

Now this is not really the fault of WordPress itself, it’s really due to what we site owners have done.

While it’s possible to build bloated pages and use techniques to make them seem fast, that shouldn’t be the goal. Let’s just build lighter pages to begin with!

Read More
  • 1
  • 2