78% product-table-for-woocommerce

Code Review | Product Table For WooCommerce

WordPress plugin Product Table For WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: product-table-for...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: May 1, 2021
  • Latest release: Nov 15, 2023
  • Number of updates: 27
  • Update frequency: every 34.4 days
  • Top authors: acowebscd (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /7,724 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.29MB] [CPU: ▼4.39ms] Passed 4 tests

Server-side resources used by Product Table For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2437.20 ▼0.62
Dashboard /wp-admin3.62 ▲0.2745.20 ▼11.70
Posts /wp-admin/edit.php3.73 ▲0.3747.24 ▼0.06
Add New Post /wp-admin/post-new.php6.21 ▲0.3397.41 ▼5.16
Media Library /wp-admin/upload.php3.54 ▲0.3135.93 ▲3.07

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 118 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Product Table For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3314.33 ▼0.021.57 ▼0.2040.49 ▼3.20
Dashboard /wp-admin2,197 ▲235.55 ▼0.0692.09 ▼6.5656.19 ▲19.18
Posts /wp-admin/edit.php2,108 ▲81.94 ▼0.0337.74 ▼0.1247.62 ▲12.77
Add New Post /wp-admin/post-new.php1,530 ▲423.96 ▲0.88617.71 ▼44.1379.17 ▲24.52
Media Library /wp-admin/upload.php1,405 ▲114.16 ▲0.0295.66 ▲0.6253.64 ▲12.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 9× PHP files output text when accessed directly:
    • > /wp-content/plugins/product-table-for-woocommerce/templates/head-right-filters.php
    • > /wp-content/plugins/product-table-for-woocommerce/includes/views/admin-root.php
    • > /wp-content/plugins/product-table-for-woocommerce/templates/leftside-filters.php
    • > /wp-content/plugins/product-table-for-woocommerce/templates/head-filters.php
    • > /wp-content/plugins/product-table-for-woocommerce/templates/sku.php
    • > /wp-content/plugins/product-table-for-woocommerce/templates/serial-number.php
    • > /wp-content/plugins/product-table-for-woocommerce/templates/title.php
    • > /wp-content/plugins/product-table-for-woocommerce/templates/loader.php
    • > /wp-content/plugins/product-table-for-woocommerce/templates/head-left-filters.php
  • 169× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: nav_layout in wp-content/plugins/product-table-for-woocommerce/templates/head-filters.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/product-table-for-woocommerce/filters/availability-filter.php:19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/product-table-for-woocommerce/templates/button.php on line 15
    • > PHP Notice
      Undefined variable: column in wp-content/plugins/product-table-for-woocommerce/templates/title.php on line 4
    • > PHP Notice
      Undefined variable: paged in wp-content/plugins/product-table-for-woocommerce/filters/result-count.php on line 10
    • > PHP Notice
      Undefined variable: table_id in wp-content/plugins/product-table-for-woocommerce/filters/onsale-filter.php on line 9
    • > PHP Notice
      Undefined variable: elem in wp-content/plugins/product-table-for-woocommerce/filters/result-count.php on line 2
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/product-table-for-woocommerce/templates/price.php on line 3
    • > PHP Notice
      Trying to get property 'query_vars' of non-object in wp-content/plugins/product-table-for-woocommerce/filters/result-count.php on line 8
    • > PHP Notice
      Undefined variable: prd_data in wp-content/plugins/product-table-for-woocommerce/templates/availability.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

product-table-for-woocommerce/start.php 92% from 13 tests

The primary PHP file in "Product Table For WooCommerce" version 1.2.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("product-table-for-woocommerce.php" instead of "start.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin13,389 lines of code in 114 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,5915586,517
PHP554395713,553
CSS5184221,488
JSON100972
PO File1319319644
SVG4700215

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 107)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity95.00
▷ Minimum class complexity19.00
▷ Maximum class complexity216.00
Average method complexity8.42
▷ Minimum method complexity1.00
▷ Maximum method complexity107.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods410.26%
▷ Public methods3897.44%
▷ Protected methods00.00%
▷ Private methods12.56%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu-icon.png1.15KB0.47KB▼ 59.06%