84% easy-options-empty-cart-per-product-wc

Code Review | Easy Options Empty Cart per product for WooCommerce

WordPress plugin Easy Options Empty Cart per product for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: easy-options-empt...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2020
  • Latest release: May 19, 2022
  • Number of updates: 6
  • Update frequency: every 92.3 days
  • Top authors: jsherk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /711 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.92ms] Passed 4 tests

An overview of server-side resources used by Easy Options Empty Cart per product for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.15 ▲6.74
Dashboard /wp-admin3.34 ▼0.0143.53 ▼13.89
Posts /wp-admin/edit.php3.39 ▲0.0348.51 ▼4.16
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.67 ▼13.66
Media Library /wp-admin/upload.php3.26 ▲0.0338.94 ▲4.02
Easy Options Empty Cart per product WC /wp-admin/options-general.php?page=easy-options-empty-cart-per-product-wc3.2330.42

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Options Empty Cart per product for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.18 ▼0.191.67 ▲0.1143.73 ▲2.97
Dashboard /wp-admin2,196 ▲195.64 ▼0.0389.64 ▲1.5638.47 ▼1.10
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0639.07 ▼3.6636.07 ▼3.50
Add New Post /wp-admin/post-new.php1,531 ▼723.35 ▲0.28668.73 ▼22.2752.76 ▲4.16
Media Library /wp-admin/upload.php1,401 ▲14.12 ▼0.06109.70 ▲7.2747.06 ▲3.90
Easy Options Empty Cart per product WC /wp-admin/options-general.php?page=easy-options-empty-cart-per-product-wc7681.9924.0043.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-options-empty-cart-per-product-wc/easy-options-empty-cart-per-product-wc.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
4 plugin tags: empty cart, add to cart, woocommerce, per product

easy-options-empty-cart-per-product-wc/easy-options-empty-cart-per-product-wc.php 92% from 13 tests

"Easy Options Empty Cart per product for WooCommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin125 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13931125

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dbut-small.png5.33KB2.67KB▼ 49.92%
dbut.png13.46KB6.06KB▼ 55.01%
stars-small.png1.50KB1.51KB0.00%