August 15, 2019

How to quickly improve your Google PageSpeed Insights score

Justin Jackson @mijustin

whelp. I spent 2.5 hours trying to optimize images and improve my PageSpeed Insights score...

Only to find that it was the Kayako widget that was bringing us down to a 76 🤦‍♂️

Once I removed it, we shot up to a 98. 🙄

https://youtu.be/RcYyA9jiJIU

  1. 2

    That was easy, nice work! I've been spending some time speeding up my site lately so here are some thoughts.

    JavaScript, external calls, Google fonts, Google Analytics, live chat, official social media sharing buttons, pop-ups and such. Each of these adds a bit to your loading time so think carefully about what exactly you need.

    GTMetrix or Pingdom tests may be easier for some to understand and identify the culprits better than Google PageSpeed Insights.

    As I'm using WordPress myself, here are things I did to speed my site up and get PageSpeed Insights score 100 too:

    Basically to optimize WordPress for speed without paying a developer, you should choose a speedy theme and minimize the number of plugins you activate (especially reduce the number of heavy and non-optimized plugins).

    Use an optimized for speed theme such as GeneratePress, Astra or Arke. Also StudioPress themes are decent for speed which I ended up using.

    Some free plugins that are optimized and that actually help speed up WordPress:

    Autoptimize plugin aggregates all the files so you have fewer requests and it minifies them. It also helps you remove Google fonts.

    Lazy Load By WP Rocket plugin helps you only load images and videos that are in the browser’s view (i.e. above the fold) without adding any JavaScript.

    Squoosh plugin helps you compress the images and reduce their size.

    Cache Enabler plugin generates static files and serves those instead of the WordPress default dynamic files.

    CDN speeds up both your statics file load times and your image load times. Site Accelerator which is free and part of the Jetpack plugin can do this for you.

    If you need social sharing buttons, use Scriptless Social Sharing which adds beautiful buttons without any external calls or JavaScript.

    Last but not least, if you're on a slow shared host your first byte time will always be slow. This is the only thing you cannot really optimize yourself without changing to a better host. Not necessary a premium or expensive host, but at least a shared host that doesn't put too many sites on one server.

    The result can be seen on my site and full details on what I did are on https://markosaric.com/speed-up-wordpress/

    1. 2

      This comment was deleted 7 months ago.

  2. 2

    I've noticed that many third party widgets, scripts, etc. fail to do some basic optimizations like compression and minification. Does lazy-loading the widget help?

    1. 2

      Yes! That's what we ended up doing. @jonbuda figured out how to lazyload the Kayako chat widget.

      We’ve got a score of 100 on mobile! 🙌

      1. 1

        Nice! I can't seem to get my score much above 50... Probably too much unused CSS/JS from Bootstrap...

  3. 2

    Saw this on Twitter. Mad to see.

  4. 1

    This inspired me to go fiddle with mine for awhile. Got it up from 30 to 63, but pushing higher basically means disabling AdSense altogether.

  5. 1

    Third-party scripts are oftentimes the culprit 🕵

  6. 1

    Similar thing happened to us with Drift. Not only did malware in their widget get our site flagged by Google, but the widget increased our page load time by 3.5 seconds. That's insane.

    Also a very quick fix to nuke Drift. Never again!

    1. 1

      Oh, thank you for sharing this! I have seen Drift chat on a lot of sites and have been meaning to check it out. Just to clarify - did you integrate with your app, e.g. send custom data to the chat for user tagging/ID?

      1. 1

        No, we didn't - just used the chat for lead generation & support

  7. 1

    This comment was deleted a month ago.

Recommended Posts