83% remove-cart-products

Code Review | Remove Cart Products

WordPress plugin Remove Cart Products scored83%from 54 tests.

About plugin

  • Plugin page: remove-cart-products
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 21, 2021
  • Latest release: May 1, 2023
  • Number of updates: 25
  • Update frequency: every 22.3 days
  • Top authors: divyeshsapariya35 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,225 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Remove Cart Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.12 ▼5.84
Dashboard /wp-admin3.31 ▼0.0461.03 ▼6.77
Posts /wp-admin/edit.php3.36 ▲0.0050.15 ▼1.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.92 ▼23.72
Media Library /wp-admin/upload.php3.23 ▲0.0036.79 ▼1.10

Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/remove-cart-products/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Remove Cart Products
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.27 ▼0.725.29 ▲3.5038.63 ▼4.88
Dashboard /wp-admin2,221 ▲185.85 ▼0.04103.46 ▼16.9142.52 ▼0.07
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0236.30 ▼5.0533.11 ▼0.81
Add New Post /wp-admin/post-new.php1,526 ▼017.72 ▲0.20698.65 ▲28.6152.63 ▼13.42
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.04101.48 ▼12.6145.42 ▼1.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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 no errors were found, 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
Almost there! Just fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/remove-cart-products/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/remove-cart-products/templates/remove-cart-product-settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/remove-cart-products/remove-cart-products.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/remove-cart-products/templates/footer-button.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/remove-cart-products/functions.php:10
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/remove-cart-products/templates/admin-setting_option.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/remove-cart-products/templates/admin-setting_option.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/remove-cart-products/templates/form-file.php:22

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Donate link: Invalid URI found ("")
The official readme.txt might help

remove-cart-products/remove-cart-products.php 92% from 13 tests

The primary PHP file in "Remove Cart Products" version 1.0.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0.0" instead of "6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,197 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PO File73433531,018
PHP89035898
CSS14117238
JavaScript27043

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity22.50
▷ Minimum class complexity12.00
▷ Maximum class complexity33.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin