89% woo-product-boxes

Code Review | Woo Product Boxes

WordPress plugin Woo Product Boxes scored89%from 54 tests.

About plugin

  • Plugin page: woo-product-boxes
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 18, 2017
  • Latest release: Jul 19, 2022
  • Number of updates: 8
  • Update frequency: every 250.7 days
  • Top authors: silverwings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.50ms] Passed 4 tests

Server-side resources used by Woo Product Boxes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.47 ▼2.42
Dashboard /wp-admin3.33 ▼0.0248.67 ▼19.97
Posts /wp-admin/edit.php3.38 ▲0.0253.60 ▲1.35
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.77 ▼8.97
Media Library /wp-admin/upload.php3.25 ▲0.0240.83 ▲3.55

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Woo Product Boxes: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.25 ▼0.471.71 ▼0.0540.35 ▼2.28
Dashboard /wp-admin2,195 ▲185.57 ▼0.10102.79 ▲7.3342.45 ▲2.65
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0140.19 ▼0.2135.19 ▼4.18
Add New Post /wp-admin/post-new.php1,526 ▼223.24 ▲0.08665.30 ▲14.3047.39 ▼6.11
Media Library /wp-admin/upload.php1,400 ▼04.38 ▲0.2096.83 ▼10.2942.72 ▲0.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === woo-product-boxes === )
  • Screenshots: These screenshots do not have images: #1 (Select products inside the box), #2 (In the product details you can find a new tab "Included products")
The official readme.txt is a good inspiration

woo-product-boxes/woo-product-boxes.php Passed 13 tests

"Woo Product Boxes" version 2.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
112 characters long description:
Product Boxes is an extension of WooCommerce, that allows to select products, and create a personalized bundles.

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
There were no executable files found in this plugin73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1331073

PHP code Passed 2 tests

This is a very shot 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.18
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.16MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png66.78KB16.93KB▼ 74.65%
screenshot-1.png97.22KB25.46KB▼ 73.81%