84% woo-product-dropdown-widget

Code Review | Product Dropdown Widget for WooCommerce

WordPress plugin Product Dropdown Widget for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-product-dropd...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Oct 25, 2023
  • Number of updates: 11
  • Update frequency: every 243.4 days
  • Top authors: razorfrog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /7,083 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.04MB] [CPU: ▼2.26ms] Passed 4 tests

A check of server-side resources used by Product Dropdown Widget for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0446.27 ▲9.90
Dashboard /wp-admin3.34 ▲0.0446.19 ▼0.11
Posts /wp-admin/edit.php3.39 ▲0.0444.23 ▼3.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.06 ▼11.40
Media Library /wp-admin/upload.php3.26 ▲0.0442.79 ▲6.41

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Product Dropdown Widget for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.021.81 ▲0.2646.27 ▲1.42
Dashboard /wp-admin2,195 ▲215.62 ▲0.0489.36 ▲2.8036.18 ▼0.95
Posts /wp-admin/edit.php2,097 ▼31.97 ▲0.0334.21 ▼0.4234.13 ▼1.43
Add New Post /wp-admin/post-new.php1,526 ▼223.11 ▼0.11660.76 ▼20.3547.79 ▼5.64
Media Library /wp-admin/upload.php1,394 ▼04.12 ▼0.10118.73 ▲18.7654.96 ▲6.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_rz_woo_category_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woo-product-dropdown-widget/woo-product-dropdown-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: products, categories, widget, woocommerce

woo-product-dropdown-widget/woo-product-dropdown-widget.php Passed 13 tests

The main PHP script in "Product Dropdown Widget for WooCommerce" version 1.1.3 is automatically included on every request by WordPress
66 characters long description:
Display WooCommerce products by category in a dropdown menu widget

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 plugin136 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13220136

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin