89% woo-cart-items-bulk-deletion

Code Review | Woocommerce Cart Items Bulk Deletion

WordPress plugin Woocommerce Cart Items Bulk Deletion scored89%from 54 tests.

About plugin

  • Plugin page: woo-cart-items-bu...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 31, 2018
  • Latest release: Aug 29, 2021
  • Number of updates: 16
  • Update frequency: every 77.9 days
  • Top authors: stangel (100%)Otto42 (12.5%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,362 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Woocommerce Cart Items Bulk Deletion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.11 ▼1.55
Dashboard /wp-admin3.33 ▲0.0244.05 ▼6.99
Posts /wp-admin/edit.php3.38 ▲0.0244.87 ▲0.81
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.81 ▼22.23
Media Library /wp-admin/upload.php3.25 ▲0.0233.41 ▼0.31

Server storage [IO: ▲0.39MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Cart Items Bulk Deletion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲14813.68 ▼0.676.10 ▲4.3741.94 ▲0.54
Dashboard /wp-admin2,207 ▲195.79 ▼0.0899.67 ▼11.6238.68 ▼4.21
Posts /wp-admin/edit.php2,090 ▲42.02 ▲0.0333.52 ▲0.5035.00 ▼0.18
Add New Post /wp-admin/post-new.php1,521 ▲123.25 ▲0.17662.85 ▲10.7860.74 ▲7.39
Media Library /wp-admin/upload.php1,395 ▲74.26 ▲0.15100.49 ▼1.3942.70 ▼3.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

woo-cart-items-bulk-deletion/wcibd.php 77% from 13 tests

Analyzing the main PHP file in "Woocommerce Cart Items Bulk Deletion" version 1.2.0
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-cart-items-bulk-deletion.php" instead of "wcibd.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 158 characters long)

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
There were no executable files found in this plugin337 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP10121531213
JavaScript3154487
CSS3101737

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.30MB with 0.22MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner.png50.23KB15.15KB▼ 69.85%
assets/icon.png25.34KB5.50KB▼ 78.30%
assets/screenshot-2.png77.91KB19.94KB▼ 74.41%
assets/screenshot-1.png150.87KB44.21KB▼ 70.70%