68% woo-cart-dropdown

Code Review | WooCommerce Dropdown Menu

WordPress plugin WooCommerce Dropdown Menu scored68%from 54 tests.

About plugin

  • Plugin page: woo-cart-dropdown
  • Plugin version: 1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Apr 15, 2018
  • Latest release: Apr 18, 2018
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: wpdistillery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,256 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.15MB] [CPU: ▼42.63ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Dropdown Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6414.38 ▼25.09
Dashboard /wp-admin2.86 ▼0.4515.23 ▼34.06
Posts /wp-admin/edit.php2.86 ▼0.5016.15 ▼33.62
Add New Post /wp-admin/post-new.php2.86 ▼3.0316.58 ▼77.73
Media Library /wp-admin/upload.php2.86 ▼0.3714.89 ▼23.23
Cart Dropdown /wp-admin/admin.php?page=woocommerce_cart_dropdown2.8616.16

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Dropdown Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲18913.65 ▼0.718.42 ▲6.5738.28 ▼6.22
Dashboard /wp-admin2,218 ▲305.90 ▲1.04107.16 ▼11.7543.99 ▲0.39
Posts /wp-admin/edit.php2,104 ▲122.02 ▼0.0339.92 ▲4.1136.86 ▲3.76
Add New Post /wp-admin/post-new.php1,535 ▲1618.50 ▼4.66602.90 ▼112.5559.31 ▼2.68
Media Library /wp-admin/upload.php1,400 ▲124.25 ▲0.0192.83 ▼9.0841.01 ▼1.46
Cart Dropdown /wp-admin/admin.php?page=woocommerce_cart_dropdown9892.0525.5141.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/woo-cart-dropdown/woocommerce-cart-dropdown.php+478
    Undefined index: wcd_display_in_menus
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • wcd_settings

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=woocommerce_cart_dropdown
    • > Notice in wp-content/plugins/woo-cart-dropdown/woocommerce-cart-dropdown.php+478
    Undefined index: wcd_display_in_menus

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-cart-dropdown/woocommerce-cart-dropdown.php:12

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: cart dropdown, ecommerce, woocommerce, menu cart, woocommerce basket

woo-cart-dropdown/woocommerce-cart-dropdown.php 92% from 13 tests

The main PHP script in "WooCommerce Dropdown Menu" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-cart-dropdown.php" instead of "woocommerce-cart-dropdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin7,108 lines of code in 288 files:
LanguageFilesBlank linesComment linesLines of code
SVG28452865,965
CSS256711
PHP114527426
JavaScript1216

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.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
No PNG files were detected