84% product-variant-table-for-woocommerce

Code Review | Product Variation Table for WooCommerce - PVT

WordPress plugin Product Variation Table for WooCommerce - PVT scored84%from 54 tests.

About plugin

  • Plugin page: product-variant-t...
  • Plugin version: 1.4.17
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 5, 2020
  • Latest release: Nov 22, 2023
  • Number of updates: 117
  • Update frequency: every 9.5 days
  • Top authors: Hakik (58.97%)wpxteam (41.88%)

Code review

54 tests

User reviews

42 reviews

Install metrics

1,000+ active /25,912 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.34ms] Passed 4 tests

A check of server-side resources used by Product Variation Table for WooCommerce - PVT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.51 ▼4.15
Dashboard /wp-admin3.35 ▲0.0548.25 ▼3.54
Posts /wp-admin/edit.php3.41 ▲0.0547.69 ▲1.87
Add New Post /wp-admin/post-new.php5.94 ▲0.0597.43 ▲0.89
Media Library /wp-admin/upload.php3.28 ▲0.0536.91 ▲1.44

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Product Variation Table for WooCommerce - PVT
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3614.26 ▼0.101.70 ▲0.0335.95 ▼7.99
Dashboard /wp-admin2,206 ▲255.62 ▲0.0593.19 ▼11.7343.26 ▲1.53
Posts /wp-admin/edit.php2,108 ▲81.96 ▼0.0540.91 ▲0.7738.57 ▲0.94
Add New Post /wp-admin/post-new.php1,534 ▲823.80 ▲0.59619.97 ▼55.7247.46 ▼7.36
Media Library /wp-admin/upload.php1,408 ▲54.18 ▼0.0196.33 ▼3.4244.51 ▲1.45

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/product-variant-table-for-woocommerce/inc/frontend/class_pvtfw_allocation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-variant-table-for-woocommerce/inc/style.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-variant-table-for-woocommerce/inc/admin/class_pvtfw_form.php:440
    • > PHP Fatal error
      Uncaught Error: Class 'PVTFW_COMMON' not found in wp-content/plugins/product-variant-table-for-woocommerce/inc/frontend/class_pvtfw_available_btn.php:80
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-variant-table-for-woocommerce/inc/admin/class_pvtfw_settings.php:171
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-variant-table-for-woocommerce/inc/table-parts/content-tbody.php:395
    • > PHP Fatal error
      Uncaught Error: Class 'PVTFW_COMMON' not found in wp-content/plugins/product-variant-table-for-woocommerce/inc/frontend/class_pvtfw_print_table.php:221
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-variant-table-for-woocommerce/inc/table-parts/content-thead.php:113
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-variant-table-for-woocommerce/inc/frontend/class_pvtfw_cart.php:253
    • > PHP Fatal error
      Uncaught Error: Class 'PVTFW_TABLE' not found in wp-content/plugins/product-variant-table-for-woocommerce/inc/admin/class_pvtfw_advance.php:103

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: woocommerce, woocommerce variable, variable product, table, variations table...

product-variant-table-for-woocommerce/product-variant-table-for-woocommerce.php Passed 13 tests

The entry point to "Product Variation Table for WooCommerce - PVT" version 1.4.17 is a PHP file that has certain tags in its header comment area
111 characters long description:
Display WooCommerce product variations in a nicely formatted and customizable table on the single product page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,759 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP177465952,163
CSS1012157785
HTML1324403
JavaScript410735313
SVG25358
Sass15037

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.00
▷ Minimum class complexity2.00
▷ Maximum class complexity49.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods88
▷ Static methods3236.36%
▷ Public methods8798.86%
▷ Protected methods00.00%
▷ Private methods11.14%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin