10% wc-multiple-cart-items-delete

Code Review | WC Multiple Cart Items Delete

WordPress plugin WC Multiple Cart Items Delete scored10%from 54 tests.

About plugin

  • Plugin page: wc-multiple-cart-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 18, 2018
  • Latest release: Oct 18, 2018
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: gunjanpatel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /521 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wmcid_DeleteCartItems::wmcid_woocommerce_exists() should not be called statically

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.83ms] Passed 4 tests

Analyzing server-side resources used by WC Multiple Cart Items Delete
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.71 ▲1.47
Dashboard /wp-admin3.31 ▼0.0451.11 ▼11.30
Posts /wp-admin/edit.php3.36 ▲0.0044.42 ▼5.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.93 ▼8.09
Media Library /wp-admin/upload.php3.23 ▲0.0037.59 ▲3.41

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WC Multiple Cart Items Delete
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.495.08 ▲3.5244.55 ▲4.49
Dashboard /wp-admin2,200 ▲124.95 ▲0.1198.56 ▼12.5038.52 ▼4.57
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0034.23 ▼1.5932.98 ▼0.72
Add New Post /wp-admin/post-new.php1,548 ▲3423.09 ▲5.59601.73 ▼99.1559.67 ▲1.88
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0895.90 ▼0.3240.76 ▼5.99

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wc-multiple-cart-items-delete/wc-multiple-cart-items-delete.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-multiple-cart-items-delete/controller.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (Note that the screenshot is existed in the "/images" directory of the plugin.(screenshot-1.png)) image required
The official readme.txt is a good inspiration

wc-multiple-cart-items-delete/wc-multiple-cart-items-delete.php Passed 13 tests

The main PHP file in "WC Multiple Cart Items Delete" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
47 characters long description:
Delete multiple cart items in bulk on cart page

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 plugin109 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2113054
JavaScript111049
CSS1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/screenshot-1.png47.95KB12.93KB▼ 73.03%