90% empty-cart-button-for-woocommerce

Code Review | Empty Cart Button for WooCommerce

WordPress plugin Empty Cart Button for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: empty-cart-button...
  • Plugin version: 1.3.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2017
  • Latest release: Sep 5, 2023
  • Number of updates: 42
  • Update frequency: every 57.5 days
  • Top authors: prowcplugins (59.52%)algoritmika (42.86%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /21,987 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.42ms] Passed 4 tests

Server-side resources used by Empty Cart Button for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1038.27 ▼2.56
Dashboard /wp-admin3.48 ▲0.1349.12 ▼8.84
Posts /wp-admin/edit.php3.59 ▲0.2347.66 ▲6.23
Add New Post /wp-admin/post-new.php6.08 ▲0.1996.66 ▼6.15
Media Library /wp-admin/upload.php3.40 ▲0.1738.28 ▲3.89

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
prowc_empty_cart_button_plugin_reviewtrack
prowc_empty_cart_button_plugin_notice_remindlater
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
prowc_empty_cart_button_activation_time
prowc_empty_cart_button_version
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Empty Cart Button for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲2214.29 ▼0.071.59 ▼0.5640.51 ▼5.83
Dashboard /wp-admin2,214 ▲345.61 ▼0.0686.10 ▼14.7039.59 ▼1.23
Posts /wp-admin/edit.php2,119 ▲192.20 ▲0.1336.72 ▼4.2533.55 ▼4.42
Add New Post /wp-admin/post-new.php1,554 ▲2718.48 ▼4.51602.89 ▼54.0568.93 ▲13.16
Media Library /wp-admin/upload.php1,419 ▲194.28 ▲0.10100.01 ▲3.2744.63 ▲3.34

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-comments
    • prowc_empty_cart_button_plugin_reviewtrack
    • can_compress_scripts
    • prowc_empty_cart_button_plugin_notice_remindlater
    • prowc_empty_cart_button_activation_time
    • widget_theysaidso_widget
    • widget_recent-posts
    • prowc_empty_cart_button_version
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 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
5 plugin tags: woocommerce plugin, empty cart button for woocommerce, plugin for empty cart, empty cart button, clear cart

empty-cart-button-for-woocommerce/empty-cart-button-for-woocommerce.php Passed 13 tests

The main PHP script in "Empty Cart Button for WooCommerce" version 1.3.8 is automatically included on every request by WordPress
36 characters long description:
"Empty cart" button for WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin883 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP593293722
CSS219110
JavaScript462151

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods37
▷ Static methods12.70%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/img/admin-rating-ecb.png0.82KB0.56KB▼ 31.62%
includes/img/prowc_logo.png38.75KB12.41KB▼ 67.98%