89% woo-order-cancel-for-customers

Code Review | WooCommerce Order Cancel for Customers

WordPress plugin WooCommerce Order Cancel for Customers scored89%from 54 tests.

About plugin

  • Plugin page: woo-order-cancel-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.5
  • WordPress version: 6.3.1
  • First release: Aug 13, 2017
  • Latest release: May 19, 2018
  • Number of updates: 4
  • Update frequency: every 69.8 days
  • Top authors: techjewel (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /7,616 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.06MB] [CPU: ▼8.64ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Order Cancel for Customers
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0645.32 ▼0.16
Dashboard /wp-admin3.37 ▲0.0648.79 ▼1.87
Posts /wp-admin/edit.php3.48 ▲0.1250.25 ▼4.20
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.28 ▼23.10
Media Library /wp-admin/upload.php3.29 ▲0.0635.97 ▼5.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Order Cancel for Customers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.27 ▼1.021.94 ▼0.0147.04 ▼1.78
Dashboard /wp-admin2,221 ▲184.85 ▼1.05114.73 ▲3.4743.18 ▼7.93
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0242.63 ▲1.8434.99 ▼6.19
Add New Post /wp-admin/post-new.php1,531 ▼923.27 ▲4.99672.88 ▲11.3658.98 ▲1.38
Media Library /wp-admin/upload.php1,394 ▼94.33 ▲0.1998.58 ▼5.1444.66 ▼0.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: handle cancel order, cancel order, woo commerce, woocommerce add-on, cancel-order...

woo-order-cancel-for-customers/woocommerce-order-cancel.php 85% from 13 tests

This is the main PHP file of "WooCommerce Order Cancel for Customers" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-order-cancel-for-customers.php" instead of "woocommerce-order-cancel.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin300 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP367109300

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods635.29%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin