84% woocommerce-dropdown-cart

Code Review | Woocommerce Dropdown Cart

WordPress plugin Woocommerce Dropdown Cart scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-dropd...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2012
  • Latest release: Jun 1, 2016
  • Number of updates: 40
  • Update frequency: every 31.7 days
  • Top authors: svincoll4 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /38,428 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.76ms] Passed 4 tests

An overview of server-side resources used by Woocommerce Dropdown Cart
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.27 ▲0.11
Dashboard /wp-admin3.35 ▼0.0047.98 ▼11.41
Posts /wp-admin/edit.php3.40 ▲0.0445.68 ▼0.84
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.20 ▼4.43
Media Library /wp-admin/upload.php3.27 ▲0.0433.22 ▼2.34

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Dropdown Cart
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.15 ▼1.231.86 ▲0.2645.82 ▲7.61
Dashboard /wp-admin2,209 ▲184.86 ▼1.02100.16 ▲1.8636.99 ▼7.58
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0339.20 ▲2.7734.96 ▲0.65
Add New Post /wp-admin/post-new.php1,531 ▼118.22 ▼5.22645.37 ▼42.2276.44 ▲20.97
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.0396.77 ▼13.2843.52 ▼2.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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/woocommerce-dropdown-cart/woocommerce-dropdown-cart.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Dropdown cart content) image missing
The official readme.txt is a good inspiration

woocommerce-dropdown-cart/woocommerce-dropdown-cart.php Passed 13 tests

The main PHP script in "Woocommerce Dropdown Cart" version 2.1.1 is automatically included on every request by WordPress
66 characters long description:
A widget plugin for WooCommerce to display the cart at top of page

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 plugin443 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
Sass1200116
PHP14027105
CSS21196
PO File2202072
JavaScript215154

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.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%
Functions3
▷ Named functions3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/cart.png1.98KB1.30KB▼ 34.25%