LASHGOD Web Optimization Journal

LASHGOD Web Optimization Journal

First, we started here

May 11, 2023.Β  Other teams have added plugins and their own design to the site, it’s slower than before:

PRODUCT PAGE May 11 2023

 

Homepage May 11 2023
tag overload
text file test; the Kinsta server responds FAST

WATERFALLS

Compare to Skims

Compare to Apple

 

Step 1 – Enable Kinsta’s new WEBP & Code Minifier & Clean Up PNG

Kinsta new optimizations 2023

USE PNG TO JPG plugin, it’s simple, lightweight, and it just works

best plugin ever

Also use Imsanity, ignore the other features, just use it to force all pictures to below a reasonable size (1600px x 1600px) is a good start.

ADVANCED SERVER WORKS

  1. disable WP-Cron;
  2. reduce AJAX and WooCommerce cart fragment usage;
In case you’re not aware, WP-Cron works by checking, on every page load, a list of scheduled tasks to see what needs to be run. Any tasks due to run will be called during that page load. These requests can start to cause performance issues with more traffic to the site. Having the server handle the crons for WordPress instead will help free up additional resources in most cases.
To disable the WordPress cron so that it is not firing on every page load and let the server handle the crons instead, you just need to add a small line of code into your wp-config.php file:
define('DISABLE_WP_CRON', true);
At Kinsta, the WP Cron should be in the server cron tab by default but you can double check to confirm this using the following guide: https://kinsta.com/knowledgebase/how-to-write-a-cron-job/#add-server-cron-job
For the issues with the Admin Ajax usage, a quick implementation you can do to try to help is to use a plugin like HeartBeat Control to see about throttling some of that usage to try and make this more efficient: https://wordpress.org/plugins/heartbeat-control/
You can select “modify heartbeat” in the plugin then drag the frequency to the maximum at 300s for all locations which will delay the heartbeat API by 300 seconds. That could help leverage some improvement with the Ajax usage. https://kinsta.com/blog/admin-ajax/
Additionally, we have a guide that goes further in depth on diagnosing and addressing Ajax issues in your WordPress site here: https://kinsta.com/blog/admin-ajax-php/#how-to-debug-high-adminajaxphp-usage-on-wordpress
As well, the WooCommerce AJAX request (wc-ajax=get_refreshed_fragments) can be extremely detrimental to your site performance and is a leading culprit in slowing things down for WooCommerce sites.
When a user makes any changes to their shopping cart, WooCommerce uses the Get Refreshed Fragments AJAX request to update the shopping cart contents dynamically. Refreshing the cart page without reloading it seems great from a user experience perspective. But most times it slows down websites and isn’t a necessary function.
If you wanted to confirm, you can usually see this if you run your site through GTMetrix and look under the Waterfall tab. To help with this issue if you are seeing it in your site, we recommend to Disable the WooCommerce cart fragments. We have a guide that touches on this here: https://kinsta.com/blog/speed-up-woocommerce/#12-disable-get-refreshed-fragments-ajax-request
If you disable this request, then it’s recommended enabling the option “Redirect to the cart page after successful addition” in your WooCommerce β†’ Products settings panel.

INTERMEDIATE RESULTS – Theme and Admin AJAX are Server Hogs

ENCOURAGING RESULTS AFTER API THROTTLE

throttled used Heartbeat API plugin
throttled used Heartbeat API plugin
Admin Ajax is no longer clogging server CPU
Admin Ajax is no longer clogging server CPU

 

INTERMEDIATE RESULTS – The Above Tweaks Worked, a Little

 

TWEAKS FOR PEAK TRAFFIC DECLOGGING

Disable AJAX Cart Frags and Kinsta Tech found some accidental Kinsta code blocking caching doesn’t really affect how Google sees our site.Β  That’s fair enough and the score here was during a semi-peak traffic hour.Β  Will see results for longer timeline

After Disabling Cart Fragments and Tech Support re Caching

 

STEP 2 – Setting Expectations: Upgrading to Elementor instead of DIVI

new theme via elementor
new theme 2nd run

(also used hummingbird CSS JS minifier, but that won’t be needed when KINSTA handles this for us)

 

Increases score overall, but similar server response time:

 

STEP 3 – ADVANCED SERVER WORKS

STEP 4 – Minimize outside server requests

 

 

STEP 5 – New Feature: EARLY HINTS

https://kinsta.com/docs/early-hints/

Early Hints tells the web browser to begin loading page resources while the server is compiling the full response. That allows the browser to load the webpage faster for the end user.

STEP 6 – Clean up the Tags & Trackers

tag overload
Peter Peng

Leave a Comment

Your email address will not be published. Required fields are marked *