What is the WooCommerce ‘power tweak’ feature?

WooCommerce is a popular e-commerce platform for WordPress. It offers great functionality but also has its challenges. Our team found a problem with WooCommerce’s performance, and we created a ‘power tweak’ feature that fixes it. This feature is one of two power tweaks available in our plugin. It makes your website more efficient by optimizing a WooCommerce database query.

What is the issue with WooCommerce?

We’ve found that WooCommerce has a critical performance issue related to one of its database queries. The query lies within a function called ‘get_total_spent’, used to calculate the total amount of money spent by a customer. The query makes a calculation using several double left-joins on the post and post meta tables for lookups. This process is inefficient, as MySQL must scan a large number of rows with each new order. On a typical site, this could involve scanning over 80% of the rows in the post meta table. In one case study, MySQL had to scan over 13,000,000 rows, significantly impacting performance and user experience.

Our solution

As developers, we’ve learned that finding our own solution is often the best way to get things done. So, we engineered this feature to confront the WooCommerce query dilemma head-on. We suggested that WooCommerce use two simpler SQL queries instead of that one complicated query. However, in the absence of changes from WooCommerce, we’ve taken the initiative.

WP-Optimize has a feature called ‘power tweak’. It replaces the problematic double left-join query in WooCommerce with two shorter, more efficient queries. This enhancement is crucial for sites with high volumes of orders.

To learn more and stay updated, check out our Github thread where our lead developer and founder, David Anderson, discusses this issue.

How to access the power tweak feature

To use this feature, you’ll need the premium version of WP-Optimize.

 

 

 

 

 

 

 

 

Free vs Premium WP-Optimize

Free version

The free version of WP-Optimize significantly enhances your site’s performance. It simplifies complex tasks like image compression, database cleanup, and caching, making them accessible – even to those who aren’t tech-savvy. This ensures that your e-commerce site runs smoothly, providing a better experience for your visitors.

 

Get free version

Premium version

Our power tweak features are just two of the many features of premium. Other benefits include: even faster page loading speeds, tools to clean up your media library by removing unused images and image sizes, premium support, and so much more.

Have a look at the full features of WP-Optimize premium here.

 

Get premium version