Home Forums WoodMart support forum How I get 94/100 at Gtmetrix page speed score? The plugins & code snippets used!

How I get 94/100 at Gtmetrix page speed score? The plugins & code snippets used!

Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #56116

    jodyshop
    Participant

    Hi, Woodmart theme lovers

    Recently I get too many negative replies and emails from users of Woodmart WP premium theme about my forum topic when I mentioned how to optimize the Woodmart theme.

    Actually, the forum topic was a bit old and with time. I discovered new tactics and plugins replacements to achieve the maximum speed of the Woodmart theme. You can check the forum topic here.

    Now, let’s learn how to optimize the theme for maximum speed and pass the most or all Gtmitrix speed grades.

    1- Please read this forum topic to be aware of the steps and avoid duplications.

    2- We need to replace this plugin: Remove Query Strings plugin (By LittleBizzy). with this plugin: Remove Query Strings From Static Resources (By Speed Up My Website).

    Why? because it makes a lot of conflict with other plugins and not do the required job meat for Woodmart them. So the replacement is better and stable.

    3- Don’t forget to use the WP fastest cache with free CDN option.

    4- Always Keep your plugins up-to-date to avoid vulnerabilities.

    5- Add this code to your (Woodmart child theme) function.php

    // Defer jQuery Parsing using the HTML5 defer property
    if (!(is_admin() )) {
        function defer_parsing_of_js ( $url ) {
            if ( FALSE === strpos( $url, '.js' ) ) return $url;
            if ( strpos( $url, 'jquery.js' ) ) return $url;
            // return "$url' defer ";
            return "$url' defer onload='";
        }
        add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
    }

    Explanation: The above code simply Defer parsing of JavaScript, Defer parsing JavaScript helps you a lot reduce blocking of page rendering and make it skyrocket fast loading.

    6- Get rid of WordPress meta generator tags, which displays your website’s WordPress version, and all of the other plugins meta generators as well for anyone to see. This can be a security risk for your website but it is easy to remove by using the below function.

    // Remove All Meta Generators
    function remove_meta_generators($html) {
        $pattern = '/<meta name(.*)=(.*)"generator"(.*)>/i';
        $html = preg_replace($pattern, '', $html);
        return $html;
    }
    function clean_meta_generators($html) {
        ob_start('remove_meta_generators');
    }
    add_action('get_header', 'clean_meta_generators', 100);
    add_action('wp_footer', function(){ ob_end_flush(); }, 100);

    7- Another speed factor is to remove Emoji styles and scripts which help increase performance and lower JavaScript and CSS resources.

    // Remove Emoji Styles and Scripts
    remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); 
    remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); 
    remove_action( 'wp_print_styles', 'print_emoji_styles' ); 
    remove_action( 'admin_print_styles', 'print_emoji_styles' );

    Now, make sure you cleared WP Fastest Cache and/or purge Cloudflare cache as well. Try to test your website with Gtmitrix and/or other speed testers to see the differences.

    References and the tested pages are:

    1- The Jodyshop Home page.
    2- The Shop page.
    3- Attached Jodyshop-Screenshot GTmetrix Performance Report A (94%) C (77%)

    Thank you for reading and wish you a skyrocket speed theme 🙂

    Attachments:
    You must be logged in to view attached files.
    #56123

    newsprince
    Participant

    Thank you very much. We are gonna try it!

    #56124

    jodyshop
    Participant

    Please note: to get the closer Gtmitrix grade to 94/100 or more you have to enable Lazyload images option from Woodmart theme options as follow:

    Goto: Theme options > Performance

    1- Enable the minification of CSS + Js and Combine JS files.
    2- Enable Images Lazyload.

    *** Check the attached Image!

    Happy speed 🙂

    Attachments:
    You must be logged in to view attached files.
    #56132

    jodyshop
    Participant

    Hi again,

    Here is another improvement I Just found if you get the annoying message: Leverage browser caching especially for Google Analytics js files.

    I found a plugin which helped me reduce Page Requests & Optimize Google Analytics JS files. The plugin name is CAOS: Complete Analytics Optimization Suite.

    Now after installing and activating the plugin, just add your analytics code and click save (nothing more). I can see my score has increased higher as shown in the attached screenshot. Wow!

    PageSpeed Score A 95/100 || YSlow Score B (82%).

    This is awesome indeed 🙂

    Attachments:
    You must be logged in to view attached files.
    #56288

    Jess
    Participant

    Thank you so much!

    #56340

    jodyshop
    Participant

    Hi Jess,
    Thank you for following up my posts 🙂

    Anyway, Today I have found the Gtmitrix score increased a bit higher!

    It’s now: Check here

    PageSpeed Score
    (96%)

    YSlow Score
    (76%)

    #56360

    newsprince
    Participant

    Can you provide us what options do you enable on WP fastest cache and if we must buy the premium version also?

    #56364

    jodyshop
    Participant

    Hi, newsprince
    Thanks for the reply!

    Actually, No, I am using the free version of everything I mentioned in my posts. (There is no big difference I noticed between the free & pro versions of WP Fastest Cache).

    Anyway, here is my current WP fastest cache settings screenshots.
    Note: I am using the free CDN option.

    Attachments:
    You must be logged in to view attached files.
    #56372

    newsprince
    Participant

    Thank you very much

    #87134

    Cero
    Participant

    nice thanks

    #88335

    brian
    Participant

    Can you provide us what options do you enable on WP-Optimize and Remove Query Strings plugin?
    best

    #108351

    cumenda
    Participant

    EXCELLENT !!!
    Thank You for sharing Your experience!

    #117499

    twgerber
    Participant

    Have you tried it with WP Rocket yet as the caching plugin?

    I don’t know if the Woodmart theme performance settings might conflict with the woodmart theme performance settings.

    #117500

    twgerber
    Participant

    And have you gotten rid of any critical path issues from the Google pagespeed tool? And the ensure text remains visible?

    All the issues appear to be related to fonts used.

    #117503

    jodyshop
    Participant

    Hello @twgerber,
    Thanks for your interest.

    Well, I have tried the “WP Rocket” once before, and yes, it gives a great optimization, but sometimes in conflict with some of the other plugins and prevented them from loading correctly.

    So, I recommend you trying the WP Fastest Cache plugin, as it works great for all scripts and plugins needed to run a multi-vendor marketplace and Amazon affiliate website.

    My website Jodyshop has multiple services like:
    Marketplace + Blog + Shop + Amazon affiliate.

    So, “WP Rocket” might conflict with some functions of these plugins and services, I have tried it a long time ago, so, they might be making updates and improve the plugin functionality.

    #117504

    jodyshop
    Participant

    Hello again @twgerber,

    All the issues appear to be related to fonts used.

    Well, you can try using CAOS for Webfonts plugin, which will help you download Google fonts and use them locally.

    #167019

    pudelis
    Participant

    I have tested all these option, and even with an empty homepage i have maximum 80, mobile 40

    #167180

    jodyshop
    Participant

    Hello @pudelis
    Thanks for your interest.

    Well, You can examine both Google Page speed and GTmetrix reports to see what’s make the pages load slowly or what exact file or source taking too long to load.

    Fix that issues and re-check the score.
    Thank you

    #199383

    UNBUENPLAN
    Participant

    Good morning, the article is great, but the web score on page speed is very low now on https://www.jodyshop.com/. What has happened? Any suggestion?

    #200003

    jodyshop
    Participant

    @UNBUENPLAN

    Thanks for letting me notice that! it was an error in the cache plugin, I have fixed it. the score is much improved once again 🙂

    Here are the recent updates:

    Attachments:
    You must be logged in to view attached files.
    #269044

    sercanag
    Participant

    Hello, I am using the wp fastest cache plugin and I am very satisfied. Does this plugin have plugins that support external expressions?

Viewing 21 posts - 1 through 21 (of 21 total)