10% woo-custom-products-widget

Code Review | WooCommerce Custom Products Widget

WordPress plugin WooCommerce Custom Products Widget scored 10% from 54 tests.

About plugin

  • Plugin page: woo-custom-produc...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.6
  • WordPress version: 6.3.1
  • First release: Jan 4, 2019
  • Latest release: Jan 4, 2021
  • Number of updates: 6
  • Update frequency: every 122.0 days
  • Top authors: christophrado (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,939 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/woo-custom-products-widget/woocommerce-custom-products-widget.php+14
    require_once(wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-widget.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.21ms] Passed 4 tests

Server-side resources used by WooCommerce Custom Products Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.18 ▲2.06
Dashboard /wp-admin3.31 ▲0.0046.20 ▼7.60
Posts /wp-admin/edit.php3.36 ▲0.0049.27 ▲2.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.29 ▼13.77
Media Library /wp-admin/upload.php3.23 ▲0.0035.94 ▲5.71

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Custom Products Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.101.64 ▼0.2043.95 ▼3.76
Dashboard /wp-admin2,209 ▲215.86 ▲1.0197.83 ▼10.2142.78 ▲2.25
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0033.39 ▼5.4934.18 ▲0.19
Add New Post /wp-admin/post-new.php1,514 ▼1917.68 ▼5.68716.54 ▲17.1251.35 ▼4.12
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0099.16 ▼8.7443.18 ▼1.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: extension, id, widget, product, list...

woo-custom-products-widget/woocommerce-custom-products-widget.php 85% from 13 tests

The entry point to "WooCommerce Custom Products Widget" version 1.0.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-custom-products-widget.php" instead of "woocommerce-custom-products-widget.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "2.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected69 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1192769

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin