78% product-table

Code Review | Product Table for WooCommerce

WordPress plugin Product Table for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: product-table
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 5.9.2
  • First release: Apr 19, 2019
  • Latest release: Apr 30, 2019
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: veyroo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 804 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.97MB] [CPU: ▼276.96ms] Passed 4 tests

A check of server-side resources used by Product Table for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.77 ▲4.2583.40 ▲24.74
Dashboard /wp-admin7.79 ▲4.3851.99 ▲15.65
Posts /wp-admin/edit.php7.79 ▲4.1561.19 ▲13.66
Add New Post /wp-admin/post-new.php10.08 ▲3.10115.41 ▼1,149.93
Media Library /wp-admin/upload.php7.79 ▲4.4943.21 ▲12.78
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius7.7944.42

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 243 new files
Database: no new tables, 5 new options
New WordPress options
fs_debug_mode
fs_options
fs_active_plugins
fs_api_cache
fs_accounts

Browser metrics Passed 4 tests

Product Table for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,920 ▲16616.69 ▲0.6913.11 ▲6.792.39 ▼0.92
Dashboard /wp-admin2,917 ▲636.40 ▲0.06116.53 ▼18.87155.92 ▼3.42
Posts /wp-admin/edit.php2,716 ▲283.44 ▲0.0164.69 ▲1.61141.19 ▼5.34
Add New Post /wp-admin/post-new.php1,729 ▲6821.13 ▲4.81453.36 ▲31.94161.14 ▲7.94
Media Library /wp-admin/upload.php1,723 ▲255.75 ▲0.02145.08 ▲2.25189.10 ▲3.15
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius1,4202.7056.36146.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 5 options in the database
    • fs_options
    • fs_api_cache
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/product-table/freemius/templates/ajax-loader.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/product-table/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/product-table/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/product-table/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/product-table/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/product-table/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/product-table/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/product-table/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/product-table/freemius/templates/partials/network-activation.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce product, woocommerce price list, product table for woocommerce, woocommerce product table, woocommerce product list

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

The main file in "Product Table for WooCommerce" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin57,029 lines of code in 189 files:
LanguageFilesBlank linesComment linesLines of code
PHP1086,35814,67126,738
JavaScript174,13514,21613,846
PO File105,5506,66712,010
Sass28399772,515
CSS25441211,898
Markdown17022

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,360)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity69.82
▷ Minimum class complexity1.00
▷ Maximum class complexity2,360.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,057
▷ Static methods16615.70%
▷ Public methods74370.29%
▷ Protected methods151.42%
▷ Private methods29928.29%
Functions92
▷ Named functions92100.00%
▷ Anonymous functions00.00%
Constants116
▷ Global constants9682.76%
▷ Class constants2017.24%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.27MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libraries/DataTables/DataTables-1.10.18/images/sort_both.png0.20KB0.29KB0.00%
wordpressorg/screenshot-1.png85.02KB31.72KB▼ 62.69%
wordpressorg/icon-128x128.png5.71KB2.73KB▼ 52.28%
libraries/DataTables/DataTables-1.10.18/images/sort_desc.png0.15KB0.25KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%