• Resolved Alex Seidanis

    (@beerallica)


    Yehellooow,

    it seems WPC considerably affects the site’s Gtmetrix score. How could I possibly 1) defer the plugin’s javascript parsing, and 2) minimize its request size (see the gtmetrix report above)

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    plugin calls the facebook sdk and pass the values.
    SDK load asynchronous, it wont stop other things to load. very very less effect to your users as sdk load asynchronous.

    WP-Chatbot directly adds 0 (zero) extra requests.
    as now the free version wont add a single extra request.
    PRO version adds a js file, may add around 3 KB.

    WP-Chatbot from the server side, as your are using cache plugin – its adds approx zero or a couple of milliseconds only.

    Have a Great Day,
    Thank you.

    Thread Starter Alex Seidanis

    (@beerallica)

    If you carefully peruse the top two issues on the gtmetrix report I submitted above, you will see that they’re all facebook-related. One of them clearly contains the message displayed on the chatbot welcoming popup.

    And this is the report I got right after I disabled the plugin:
    https://gtmetrix.com/reports/stamatakis-derma.gr/rnTFq3bc

    It’s clear as day that the plugin negatively affects the gtmetrix report. Would you be willing to look at the issue?

    For your convenience, here are the original queries:

    How could I possibly
    1) defer the plugin’s javascript parsing, and
    2) minimize its request size

    Thanks,

    Alex

    may be above answer we added is not perfect,

    wp-chatbot plugin builds based on Messenger customer chat
    https://developers.facebook.com/docs/messenger-platform/discovery/customer-chat-plugin
    and pass values to sdk based on plugin settings. like page id, app id, …

    wp-chatbot plugin adds similar content on your website

    <script>
      window.fbAsyncInit = function() {
        FB.init({
          appId            : 'your-app-id',
          autoLogAppEvents : true,
          xfbml            : true,
          version          : 'v3.1'
        });
      };
    
      (function(d, s, id){
         var js, fjs = d.getElementsByTagName(s)[0];
         if (d.getElementById(id)) {return;}
         js = d.createElement(s); js.id = id;
         js.src = "https://connect.facebook.net/en_US/sdk.js";
         fjs.parentNode.insertBefore(js, fjs);
       }(document, 'script', 'facebook-jssdk'));
    </script>
    <div class="fb-customerchat"
     page_id="<PAGE_ID>">
    </div>

    very similar to this number of lines of code only, this plugin adds.

    i.e. the plugin calls only one request – fb customer chat sdk, and that sdk may call other requests.
    those things are not in our control to parse, minimize.

    one way we can do – this may or may not work – but very hard to maintain bug fixes,
    to get updates from facebook.
    manually have to copy the content of this file
    https://connect.facebook.net/en_US/sdk.js
    and
    have to check what other request this file is making and have to manually copy the content and have to modify
    but it’s very hard to maintain the updates. when ever facebook make an adjustment, to get the updates we have to redo all the things – its very hard. bug fixes, updates may get delay.

    e.g. its something like adding analytics tools, the analytics tools provide a few lines of code and we will add that in our website and that code may call other requests. that completely not in our hand.

    simple answer:
    that not completely in our hand.

    Have a Great Day,
    Thank You

    facebook take care a lot, most of the content minimized, may uses cdn to deliver content.

    and sdk load asynchronous. your webpage content wont stop loading until loading sdk.
    so for your user very very less effect.

    webpage size may increase but very less effect to end user on page view-ability

    Have a Great Day,
    Thank You

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP Chatbot plunges the Gtmetrix score’ is closed to new replies.