71% product-blocks

Code Review | ProductX – WooCommerce Builder & Gutenberg WooCommerce Blocks

WordPress plugin ProductX – WooCommerce Builder & Gutenberg WooCommerce Blocks scored71%from 54 tests.

About plugin

  • Plugin page: product-blocks
  • Plugin version: 3.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2020
  • Latest release: Dec 3, 2023
  • Number of updates: 122
  • Update frequency: every 10.9 days
  • Top authors: wpxpo (100%)

Code review

54 tests

User reviews

52 reviews

Install metrics

3,000+ active /150,381 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.27MB] [CPU: ▲6.77ms] Passed 4 tests

Server-side resources used by ProductX – WooCommerce Builder & Gutenberg WooCommerce Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.06 ▲1.60311.51 ▲270.03
Dashboard /wp-admin4.60 ▲1.2662.13 ▼1.54
Posts /wp-admin/edit.php4.66 ▲1.3060.31 ▲14.81
Add New Post /wp-admin/post-new.php7.14 ▲1.25102.22 ▲2.12
Media Library /wp-admin/upload.php4.50 ▲1.2844.00 ▲11.68
Getting Started /wp-admin/admin.php?page=wopb-settings4.6154.91
Upgrade to Pro /wp-admin/admin.php?page=go_productx_pro4.4743.26
Initial Setup /wp-admin/admin.php?page=wopb-initial-setup-wizard4.5146.14

Server storage [IO: ▲10.34MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 436 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
wopb_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
_wopb_active_do_redirect
theysaidso_admin_options

Browser metrics 50% from 4 tests

ProductX – WooCommerce Builder & Gutenberg WooCommerce Blocks: an overview of browser usage
You may want to improve the following
  • Memory: In order to improve user experience, please limit browser memory usage to 75.00MB (currently 90.81MB on /wp-admin/admin.php?page=wopb-settings#tutorials)
  • Script duration: Please improve your JavaScript code, lowering total execution time to less than 1,500.00ms (currently 2,269.31ms on /wp-admin/admin.php?page=wopb-settings#tutorials)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,156 ▲40915.04 ▲0.331.19 ▼0.5410.61 ▼33.32
Dashboard /wp-admin2,553 ▲3766.62 ▲0.95127.65 ▲25.60115.48 ▲72.25
Posts /wp-admin/edit.php2,489 ▲3863.75 ▲1.7561.30 ▲24.0399.51 ▲62.99
Add New Post /wp-admin/post-new.php1,726 ▲20023.48 ▲0.50620.37 ▼13.6435.35 ▼13.98
Media Library /wp-admin/upload.php1,628 ▲2344.41 ▲0.2386.38 ▼10.9791.97 ▲51.67
Template Kits /wp-admin/admin.php?page=wopb-settings#templatekit1,89010.51370.4375.53
Getting Started /wp-admin/admin.php?page=wopb-settings2,22122.85467.4689.25
Saved Templates /wp-admin/admin.php?page=wopb-settings#saved-templates1,83910.71128.0253.86
Tutorials /wp-admin/admin.php?page=wopb-settings#tutorials8,17890.812,269.3185.67
License /wp-admin/admin.php?page=wopb-settings#license1,72510.33109.5870.01
Upgrade to Pro /wp-admin/admin.php?page=go_productx_pro8681.7011.7035.73
Addons /wp-admin/admin.php?page=wopb-settings#addons3,43711.10115.9958.04
Blocks /wp-admin/admin.php?page=wopb-settings#blocks4,66512.62165.89127.78
Initial Setup /wp-admin/admin.php?page=wopb-initial-setup-wizard1,2509.54160.6642.50
Custom Font /wp-admin/admin.php?page=wopb-settings#custom-font1,92110.84126.8455.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • _wopb_active_do_redirect
    • wopb_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=go_productx_pro
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-blocks/addons/divi/divi.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/product-blocks/addons/beaver_builder/beaverbuilder.php:2
    • > PHP Notice
      Trying to get property 'template' of non-object in wp-content/plugins/product-blocks/addons/beaver_builder/includes/frontend.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/product-blocks/addons/beaver_builder/includes/frontend.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OxyEl' not found in wp-content/plugins/product-blocks/addons/oxygen/oxygen.php:3
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/product-blocks/addons/beaver_builder/includes/frontend.php on line 1

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wopb-settings#custom-font
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=wopb-settings#templatekit
    • > Network (severe)
    index.php/wp-json/wopb/v2/get_all_templates?_locale=user - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wopb-settings#templatekit
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=wopb-settings#templatekit 0:0 Uncaught Object: No route was found matching the URL and request method.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (WooCommerce Builder), #2 (The Query Builder), #3 (Shop page template), #4 (Starter Packs), #5 (Ready design library), #6 (Save Template), #7 (Variation Swatches), #8 (Product Comparison), #9 (Partial payment), #10 (Quick View), #11 (Wishlist), #12 (Pre order), #13 (Stock progress bar), #14 (Backorder), #15 (Call for price), #16 (Flip Image), #17 (WooCommerce pagination)
The official readme.txt is a good inspiration

product-blocks/product-blocks.php 92% from 13 tests

Analyzing the main PHP file in "ProductX – WooCommerce Builder & Gutenberg WooCommerce Blocks" version 3.1.2
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 481 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin64,596 lines of code in 353 files:
LanguageFilesBlank linesComment linesLines of code
PHP1172,8633,32753,637
JavaScript171,1543755,373
CSS133372,3562,960
SVG20610272,626

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 275)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity44.97
▷ Minimum class complexity1.00
▷ Maximum class complexity809.00
Average method complexity6.52
▷ Minimum method complexity1.00
▷ Maximum method complexity275.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes73
▷ Abstract classes00.00%
▷ Concrete classes73100.00%
▷ Final classes11.37%
Methods584
▷ Static methods111.88%
▷ Public methods58199.49%
▷ Protected methods20.34%
▷ Private methods10.17%
Functions82
▷ Named functions3846.34%
▷ Anonymous functions4453.66%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
56 compressed PNG files occupy 1.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/dashboard/getting_started/product_pagination.png12.93KB12.67KB▼ 2.01%
assets/img/blocks/builder/archive/al2.png0.13KB0.13KB0.00%
assets/img/heading/hstyle11.png3.67KB3.68KB0.00%
assets/img/dashboard/getting_started/product_category_grid.png16.53KB16.50KB0.21%
assets/img/WordPress.png82.46KB25.93KB▼ 68.56%