68% woo-product-tables

Code Review | Product Table by WBW

WordPress plugin Product Table by WBW scored68%from 54 tests.

About plugin

  • Plugin page: woo-product-tables
  • Plugin version: 1.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 23, 2018
  • Latest release: Nov 17, 2023
  • Number of updates: 107
  • Update frequency: every 18.4 days
  • Top authors: woobewoo (100%)

Code review

54 tests

User reviews

33 reviews

Install metrics

2,000+ active /140,366 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲2.12MB] [CPU: ▲6.96ms] Passed 4 tests

Server-side resources used by Product Table by WBW
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.95 ▲1.4853.92 ▲12.29
Dashboard /wp-admin5.75 ▲2.4458.64 ▲10.99
Posts /wp-admin/edit.php5.82 ▲2.4664.24 ▲13.13
Add New Post /wp-admin/post-new.php7.98 ▲2.0994.71 ▼8.59
Media Library /wp-admin/upload.php5.75 ▲2.5253.36 ▲19.67
Show All Tables /wp-admin/admin.php?page=wtbp-table-press&tab=wootablepress5.7753.59
Settings /wp-admin/admin.php?page=wtbp-table-press&tab=settings5.7747.64

Server storage [IO: ▲5.30MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 337 new files
Database: 6 new tables, 11 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Product Table by WBW
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6214.18 ▲0.051.73 ▼0.1042.91 ▼1.85
Dashboard /wp-admin2,232 ▲555.58 ▼0.0593.56 ▼10.1639.87 ▼8.00
Posts /wp-admin/edit.php2,134 ▲311.96 ▼0.0641.33 ▲6.0535.48 ▼3.01
Add New Post /wp-admin/post-new.php1,553 ▲2723.45 ▲0.15705.78 ▲17.4262.12 ▲5.19
Media Library /wp-admin/upload.php1,428 ▲314.15 ▼0.0396.76 ▼5.6441.91 ▼1.42
Add New Table /wp-admin/admin.php?page=wtbp-table-press&tab=wootablepress#wtbpadd1,0633.6244.5722.85
Show All Tables /wp-admin/admin.php?page=wtbp-table-press&tab=wootablepress1,0573.6248.6422.15
Settings /wp-admin/admin.php?page=wtbp-table-press&tab=settings1,0533.5646.4222.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wtbp_favorites
    • wp_wtbp_tables
  • The uninstall procedure has failed, leaving 9 options in the database
    • wtbp_plugin_activation_errors
    • wtbp_plug_was_used
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • wtbp_opts_data
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-product-tables/modules/promo/views/tpl/overviewTabContent.php
    • > /wp-content/plugins/woo-product-tables/modules/wootablepress/views/tpl/wootablepressDescriptionPopup.php
    • > /wp-content/plugins/woo-product-tables/modules/promo/views/tpl/adminTour.php
    • > /wp-content/plugins/woo-product-tables/modules/promo/views/tpl/layeredStylePromo.php
    • > /wp-content/plugins/woo-product-tables/modules/promo/views/tpl/welcomePage.php
  • 64× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-tables/config.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'ViewWtbp' not found in wp-content/plugins/woo-product-tables/modules/pages/views/pages.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-product-tables/modules/promo/views/tpl/adminFooter.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TableWtbp' not found in wp-content/plugins/woo-product-tables/classes/tables/modules.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ModuleWtbp' not found in wp-content/plugins/woo-product-tables/modules/promo/mod.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/woo-product-tables/modules/wootablepress/views/tpl/wootablepressVariablesPopup.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ControllerWtbp' not found in wp-content/plugins/woo-product-tables/modules/admin_nav/controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'BaseObjectWtbp' not found in wp-content/plugins/woo-product-tables/classes/view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woo-product-tables/config.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'TableWtbp' not found in wp-content/plugins/woo-product-tables/classes/tables/tables.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: woocommerce product table, woocommerce, quick order form, product table, bulk order form

woo-product-tables/woo-producttables.php 85% from 13 tests

This is the main PHP file of "Product Table by WBW" version 1.9.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-product-tables.php" instead of "woo-producttables.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.3" instead of "3.4.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected44,507 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
PO File52,6453,3317,645

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 423)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity31.62
▷ Minimum class complexity1.00
▷ Maximum class complexity691.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity423.00
Code structure
▷ Abstract classes912.33%
▷ Concrete classes6487.67%
▷ Final classes00.00%
▷ Static methods24028.44%
▷ Public methods77591.82%
▷ Protected methods516.04%
▷ Private methods182.13%
▷ Named functions1780.95%
▷ Anonymous functions419.05%
▷ Global constants5880.56%
▷ Class constants1419.44%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
69 PNG files occupy 0.25MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
modules/wootablepress/img/filter_attr.png3.91KB1.90KB▼ 51.26%
modules/wootablepress/img/pagination.png4.21KB1.92KB▼ 54.31%