89% woocommerce-variable-product-description

Code Review | WooCommerce Variable Product Description

WordPress plugin WooCommerce Variable Product Description scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-varia...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.3.1
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: Nov 6, 2015
  • Number of updates: 7
  • Update frequency: every 50.9 days
  • Top authors: growdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,565 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by WooCommerce Variable Product Description
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0155.66 ▲15.14
Dashboard /wp-admin3.31 ▲0.0145.18 ▼2.95
Posts /wp-admin/edit.php3.37 ▲0.0148.22 ▼0.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.03 ▼15.96
Media Library /wp-admin/upload.php3.24 ▲0.0134.85 ▲1.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Variable Product Description
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.56 ▼0.792.27 ▲0.5043.65 ▼2.52
Dashboard /wp-admin2,213 ▲226.06 ▲0.16103.06 ▲2.6740.07 ▼2.09
Posts /wp-admin/edit.php2,095 ▲32.04 ▲0.0239.52 ▼0.2237.11 ▲0.27
Add New Post /wp-admin/post-new.php1,526 ▼423.14 ▲4.87669.47 ▲44.6852.05 ▼1.35
Media Library /wp-admin/upload.php1,395 ▲44.29 ▲0.0999.23 ▲3.7642.17 ▲0.80

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: woocommerce add-on, enhancement, ecommerce, woocommerce

woocommerce-variable-product-description/woocommerce-variation-description.php 85% from 13 tests

"WooCommerce Variable Product Description" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-variable-product-description.php" instead of "woocommerce-variation-description.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected118 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP37312398
JavaScript13511
Markdown1609

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.30MB with 0.19MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png99.36KB31.55KB▼ 68.24%
screenshot-2.png210.12KB92.29KB▼ 56.08%