80% woocommerce-sold-out-products

Code Review | WooCommerce Sold Out Products

WordPress plugin WooCommerce Sold Out Products scored80%from 54 tests.

About plugin

  • Plugin page: woocommerce-sold-...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.2
  • WordPress version: 6.3.1
  • First release: May 13, 2013
  • Latest release: Aug 27, 2013
  • Number of updates: 10
  • Update frequency: every 10.7 days
  • Top authors: Kloon (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

800+ active /59,586 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.70MB] [CPU: ▼51.13ms] Passed 4 tests

A check of server-side resources used by WooCommerce Sold Out Products
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.178.43 ▼35.86
Dashboard /wp-admin2.30 ▼1.0010.02 ▼37.23
Posts /wp-admin/edit.php2.30 ▼1.0510.52 ▼39.09
Add New Post /wp-admin/post-new.php2.30 ▼3.599.89 ▼92.32
Media Library /wp-admin/upload.php2.30 ▼0.9311.33 ▼24.35

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
widget_sold_out_products
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Sold Out Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.23 ▼1.151.72 ▼0.2141.72 ▼1.82
Dashboard /wp-admin2,203 ▲215.86 ▼0.00116.26 ▲9.4242.24 ▼2.25
Posts /wp-admin/edit.php2,092 ▲32.03 ▼0.0140.12 ▼0.4434.52 ▼1.15
Add New Post /wp-admin/post-new.php1,533 ▲1223.20 ▼0.01628.71 ▲21.2353.33 ▼3.89
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0898.91 ▲1.0939.77 ▼2.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WC_Widget_Sold_Out_Products is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_sold_out_products
    • db_upgraded
    • theysaidso_admin_options

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 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

woocommerce-sold-out-products/woocommerce-sold-out-products.php Passed 13 tests

"WooCommerce Sold Out Products" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
80 characters long description:
Adds a sold out products widget and shortcode to showcase your sold out products

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin255 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP683136229
CSS10026

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.26
Average class complexity14.50
▷ Minimum class complexity9.00
▷ Maximum class complexity20.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.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
PNG images were not found in this plugin