Help to improve speed score.

I am not getting a good score even after doing all the recommendations. I have Hummingbird and Smush Pro both installed configure well but still not getting a good score. Please check and help.

  • Adam Czajczyk
    • Support Gorilla

    Hi Emerson

    I hope you're well today!

    I checked the site and I think there's quite a lot "squeezed out" out of optimization settings. The score itself (in PageSpeed) isn't quite "impressive" but the site loads quite fast and, to be perfectly honest, I don't think the test results in PageSpeed are quite accurate here.

    Let me explain :slight_smile: I run a number of them on your site, with a 1-2 minute breaks between without making any changes to the site. They were quite inconsistent. While the score itself remained at the similar level, the times given in results ranged from less than a second for "first paint" to 3 seconds - from test to test. But the site still loaded fine. I would then trust more GTMetrix in this case and the main issue in GTMetrix seems to be "Defer parsing of JavaScript".

    However, if you expand that tab there you'll notice that most of these scripts are from 3rd-party sources (YouTube) and they also don't seem to be detected by Asset Optimization in Hummingbird which means they are not "enqueued" in a usual/standard/expected WordPress way but probably either added "dynamically" but the theme or some plugin or they are just directly linked (so cannot be processed).

    Are you aware where these scripts are coming from (how are they added to the site)? If you could shed some light on this that could help - dealing with them, although might require some customization, would most likely help with the score.

    The second important thing - and that actually is affecting the speed - is FontAwesome font. They are not properly loaded currently and that adds up up over a second to the site load per each reference. If you take a look at the "Waterfall" tab in GTMetrix, you'll find out that actually delays the site load significantly.

    This should be possible to deal by making a small change. According to the GTMetrix "waterfall" these fonts are expected to be under "https://yoursite.com/fonts/" folder. The specific URLs are (I stripped your domain name, note that):

    https://yourdomain.com/fonts/fontawesome-webfont.woff?v=4.4.0
    https://yourdomain.com/fonts/fontawesome-webfont.ttf?v=4.4.0
    https://yourdomain.com/fonts/fontawesome-webfont.woff2?v=4.4.0

    The simplest way of dealing with that would be to actually create a "/fonts" folder in the root folder of your WP install and upload FontAwesome

    fontawesome-webfont.woff
    fontawesome-webfont.ttf
    fontawesome-webfont.woff2

    files there. That's a bit of workaround but but should do the trick.

    Another way is to actually fix the theme. These fonts are loaded by the theme and all these font files and their related CSS are loaded from FontAwesome CDN at maxcdn. So, to "fix" the theme you would have to create a child-theme of the theme (unless it's already a child-theme) and add some custom code there to actually dequeue/deregister these fonts and then enqueue/register them back to be loaded from your local server, referenced in CSS jusing full (absolute) URLs pointing to your site. That's doable but it's a bit of custom work and the complexity of it depends on how the theme is built. Personally, I'd rather go the first way and downloaded missing files then put them on the server into the /fonts/ folder.

    If you have any further questions, let me know please.

    Kind regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hello Emerson

    I checked the site and noticed that the site was still trying to fetch files from wrong locations. Therefore I cleared cache fully (by going to the "Hummingbird -> Dashboard" page and clicking on "Clear cache" button there).

    There's no more "CORS" error in console and current PageSpeed Score on GTMetrix is A (96%) with all the recommendations there at A level.

    In PageSpeed Insights score's also jumped up significantly.

    I think that's fine now and unless you want to go for a serious re-development of the site (which would actually require custom developed theme and most likely getting rid and/or custom developing of some plugins) that's not much more that could/need to be done.

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hi Emerson

    now what can I do to fix the YSlow area, namely the following categories:

    Make fewer HTTP requests
    Add Expires headers
    Use cookie-free domains
    Minify JavaScript and CSS

    That's, I'm afraid, the part where custom development would have to be done but if it was my site, I wouldn't actually bother much about it as benefits are very unlikely to outweigh the costs. Let me explain:

    1) Make fewer HTTP requests

    The GTMetrix sugests that there are 17 external JS scripts and 13 external stylesheets and they recommend to combine them. The issue is:

    - JS/CSS scripts that are served from your site (as well as those served from our CDN) are served "in parallel" so whether they are combined or not doesn't really matter - they are downloaded by the browser at the same time as the server supports HTTP/2; it seems GTMetrix isn't for some reason recognizing it properly

    - JS/CSS scripts that are served from 3rd-party domains (e.g. from Google, Youtube etc) - those you cannot affect in any way as you don't have any access to them. That is, unless you find a way to actually download them and modify the site in a way so it would serve them from your server. But that's not as simple as with fonts earlier and if possible at all would require a developer to do some serious work on the site

    2) Add Expires headers

    Again, most of the assets listed here are external to your site - from Google in fact. You cannot add any headers to them unless you make them local. In case of Google fonts it is doable but still requires development work. There's a nice guide on this in case you wanted to give it a try but please note that it might need some more work depending on how your theme/plugins work; if you don't feel like doing that, you might consider hiring a developer as it's a bit outside the scope of this support forum.

    https://onlinemediamasters.com/load-google-fonts-locally-wordpress/

    It might, however, be worth a shot if you can do it on your own.

    3) Use cookie-free domains

    Here's a guide on how to achieve that with WordPress:

    https://www.keycdn.com/support/how-to-use-cookie-free-domains

    Please note: I can tell from experience - my own and Member's sites that I worked with over the years - that while sometimes it works "just fine", sometimes it creates really unexpected and not-quite-solvable issues. Fortunately, the process is reversible.

    4) Minify JavaScript and CSS

    There's only one resource listed and that's already minified asset served from our CDN. That's a "bargain" -something for something. In this case, just one reported asset instead of multiple ones. It doesn't actually affect loading speed in any noticeable way.

    To sum it up: making Google Fonts local and trying to set up cookie-less domains might be worth a try if you feel like giving a try to the linked guides on your own. In case you needed to hire a developer for this, I honestly don't think the achieved difference in speed/score - if any - would be worth the cost.

    If you have any additional questions, let me know, please.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.