83% block-for-woo-product-table

Code Review | Gutenberg Block for WooCommerce Product Table

WordPress plugin Gutenberg Block for WooCommerce Product Table scored83%from 54 tests.

About plugin

  • Plugin page: block-for-woo-pro...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.2.2
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: Jul 13, 2023
  • Number of updates: 18
  • Update frequency: every 63.8 days
  • Top authors: Barn2Media (88.89%)amirition (16.67%)

Code review

54 tests

User reviews

3 reviews

Install metrics

3,000+ active /32,858 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.15ms] Passed 4 tests

An overview of server-side resources used by Gutenberg Block for WooCommerce Product Table
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0347.04 ▼7.04
Dashboard /wp-admin3.59 ▲0.0356.36 ▲2.95
Posts /wp-admin/edit.php3.71 ▲0.0349.28 ▼5.51
Add New Post /wp-admin/post-new.php6.17 ▲0.0396.66 ▼0.79
Media Library /wp-admin/upload.php3.52 ▲0.0340.60 ▲0.75

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Gutenberg Block for WooCommerce Product Table
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▼0.152.08 ▲0.3945.99 ▲4.86
Dashboard /wp-admin2,195 ▲185.66 ▲0.1197.10 ▲4.6141.57 ▼1.29
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0238.24 ▼5.4933.67 ▼3.26
Add New Post /wp-admin/post-new.php1,545 ▼423.13 ▼0.05645.31 ▼73.3058.26 ▲6.25
Media Library /wp-admin/upload.php1,403 ▲34.31 ▲0.09100.24 ▼9.9442.06 ▼6.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Barn2\\Plugin\\WC_Product_Table_Block\\add_action() in wp-content/plugins/block-for-woo-product-table/src/class-compat.php:154
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Barn2\\Plugin\\WC_Product_Table_Block\\add_action() in wp-content/plugins/block-for-woo-product-table/src/class-plugin.php:173
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Barn2\\Plugin\\WC_Product_Table_Block\\add_action() in wp-content/plugins/block-for-woo-product-table/src/class-block.php:312
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Barn2\\Plugin\\WC_Product_Table_Block\\add_action() in wp-content/plugins/block-for-woo-product-table/src/class-rest.php:111

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 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
5 plugin tags: order form, product table, block, blocks, gutenberg block

block-for-woo-product-table/block-for-woo-product-table.php 77% from 13 tests

The main file in "Gutenberg Block for WooCommerce Product Table" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.3" instead of "3.7")
  • Git Repository: Please do not include Git repositories in your plugin
  • Description: Please keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,588 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11262651,272
CSS203499
PHP5176215404
Sass1601366
YAML20032
JSON10015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.50
▷ Minimum class complexity6.00
▷ Maximum class complexity13.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods1858.06%
▷ Public methods2580.65%
▷ Protected methods00.00%
▷ Private methods619.35%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-2.png91.70KB90.26KB▼ 1.57%
.wordpress-org/icon-256x256.png2.14KB2.20KB0.00%
assets/images/block-preview.png43.32KB38.99KB▼ 9.98%
.wordpress-org/banner-772x250.png12.82KB13.31KB0.00%
.wordpress-org/banner-1544x500.png23.76KB24.26KB0.00%