83% simple-product-table-for-woocommerce

Code Review | simple product table for WooCommerce

WordPress plugin simple product table for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: simple-product-ta...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Dec 9, 2021
  • Latest release: Dec 9, 2021
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: bluegamediversion (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /220 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.37ms] Passed 4 tests

An overview of server-side resources used by simple product table for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.91 ▼1.85
Dashboard /wp-admin3.36 ▲0.0146.91 ▼16.93
Posts /wp-admin/edit.php3.41 ▲0.0549.28 ▼3.44
Add New Post /wp-admin/post-new.php6.00 ▲0.1190.39 ▼7.24
Media Library /wp-admin/upload.php3.28 ▲0.0536.43 ▼0.29
Add New /wp-admin/post-new.php?post_type=spt_product_table3.3244.98
Product Tables /wp-admin/edit.php?post_type=spt_product_table3.3238.24

Server storage [IO: ▲0.33MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by simple product table for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲18913.74 ▼0.6112.81 ▲11.2346.43 ▲5.04
Dashboard /wp-admin2,216 ▲395.52 ▼0.1387.96 ▼6.7239.87 ▼0.48
Posts /wp-admin/edit.php2,127 ▲271.98 ▼0.0338.95 ▼1.3035.66 ▼2.42
Add New Post /wp-admin/post-new.php1,559 ▲3318.01 ▼4.99628.57 ▲0.7368.92 ▲13.91
Media Library /wp-admin/upload.php1,427 ▲274.23 ▲0.0496.92 ▼10.3745.71 ▲0.71
Add New /wp-admin/post-new.php?post_type=spt_product_table1,5642.7158.2571.21
Product Tables /wp-admin/edit.php?post_type=spt_product_table1,0932.4235.9231.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-product-table-for-woocommerce/public/partials/sptable-public-display.php

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "#"
You can take inspiration from this readme.txt

simple-product-table-for-woocommerce/sptable.php 85% from 13 tests

The main PHP file in "simple product table for WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-product-table-for-woocommerce.php" instead of "sptable.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin6,203 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,2913585,153
PHP12136553578
CSS46515472

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.86
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods823.53%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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
No PNG files were detected