90% empty-cart-button-for-woocommerce

Code Review | Empty Cart Button for WooCommerce

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

About plugin

  • Plugin page: empty-cart-button...
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7.2
  • WordPress version: 5.8.1
  • First release: Jan 22, 2017
  • Latest release: Aug 6, 2021
  • Number of updates: 34
  • Update frequency: every 48.7 days
  • Top authors: algoritmika (52.94%)prowcplugins (50%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 13,550 total downloads


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: ▼143.91ms] 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 /2.93 ▲0.0951.95 ▲13.90
Dashboard /wp-admin3.23 ▲0.1747.39 ▼5.07
Posts /wp-admin/edit.php3.34 ▲0.2356.11 ▲11.40
Add New Post /wp-admin/post-new.php5.58 ▲0.1599.02 ▼587.66
Media Library /wp-admin/upload.php3.17 ▲0.1741.17 ▲5.70

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, 4 new options
New WordPress options

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 /3,703 ▲10715.96 ▲0.4111.10 ▼1.5250.48 ▼3.50
Dashboard /wp-admin2,992 ▲616.33 ▲0.38156.06 ▼5.14115.44 ▼10.88
Posts /wp-admin/edit.php2,764 ▲252.85 ▲0.1376.53 ▲4.16107.68 ▲13.45
Add New Post /wp-admin/post-new.php1,519 ▼16418.59 ▼0.08398.07 ▲2.88119.94 ▼2.98
Media Library /wp-admin/upload.php1,832 ▲255.09 ▲0.06156.86 ▲0.48133.98 ▲5.02

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: 4 options
    • prowc_empty_cart_button_version
    • prowc_empty_cart_button_activation_time
    • prowc_empty_cart_button_plugin_reviewtrack
    • prowc_empty_cart_button_plugin_notice_remindlater

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


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

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.3 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 plugin873 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

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
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
▷ Static methods12.70%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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%