90% custom-order-statuses-woocommerce

Code Review | Custom Order Status for WooCommerce

WordPress plugin Custom Order Status for WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: custom-order-stat...
  • Plugin version: 2.3.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Jul 4, 2023
  • Number of updates: 74
  • Update frequency: every 32.9 days
  • Top authors: tychesoftwares (56.76%)algoritmika (44.59%)

Code review

54 tests

User reviews

25 reviews

Install metrics

10,000+ active / 211,284 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.00MB] [CPU: ▼6.52ms] Passed 4 tests

A check of server-side resources used by Custom Order Status for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.08 ▼8.49
Dashboard /wp-admin3.31 ▲0.0146.23 ▼6.85
Posts /wp-admin/edit.php3.36 ▲0.0049.02 ▼2.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.50 ▼7.88
Media Library /wp-admin/upload.php3.23 ▲0.0039.02 ▲6.18

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Custom Order Status for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.501.61 ▼0.0344.21 ▲6.61
Dashboard /wp-admin2,206 ▲274.84 ▼0.99105.96 ▲2.1638.71 ▼7.36
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0338.76 ▼3.0534.97 ▼1.76
Add New Post /wp-admin/post-new.php1,520 ▼2223.06 ▲4.88651.27 ▲21.8953.48 ▲2.54
Media Library /wp-admin/upload.php1,382 ▼64.25 ▲0.0399.17 ▲1.9944.02 ▲2.23

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce, order status, woo commerce, custom status

custom-order-statuses-woocommerce/custom-order-statuses-for-woocommerce.php 92% from 13 tests

"Custom Order Status for WooCommerce" version 2.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-order-statuses-woocommerce.php" instead of "custom-order-statuses-for-woocommerce.php")

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
Everything looks great! No dangerous files found in this plugin2,533 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP132641,0171,987
PO File1130191331
JavaScript2497210
XML1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity24.10
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods81
▷ Static methods56.17%
▷ Public methods81100.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin