88% wc-custom-order-status-per-product

Code Review | Custom Order Status Per Product WooCommerce

WordPress plugin Custom Order Status Per Product WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: wc-custom-order-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Oct 13, 2020
  • Latest release: Oct 18, 2021
  • Number of updates: 7
  • Update frequency: every 53.4 days
  • Top authors: vp956009 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 495 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼138.20ms] 75% from 4 tests

An overview of server-side resources used by Custom Order Status Per Product WooCommerce
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 5,567.07ms on /wp-admin/admin.php?page=ocwcp_kit)
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.2434.46 ▲12.60
Dashboard /wp-admin3.18 ▲0.1343.31 ▲3.18
Posts /wp-admin/edit.php3.30 ▲0.1847.61 ▲4.17
Add New Post /wp-admin/post-new.php5.54 ▲0.1089.99 ▼565.09
Media Library /wp-admin/upload.php3.13 ▲0.1237.27 ▲4.96
Essential Kit /wp-admin/admin.php?page=ocwcp_kit3.315,567.07
WC Custom Order Status /wp-admin/admin.php?page=wc-custom-order-status3.1031.64

Server storage [IO: ▲0.11MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Custom Order Status Per Product WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,751 ▲14516.33 ▲0.348.54 ▼1.8345.93 ▲3.30
Dashboard /wp-admin3,037 ▲1066.66 ▲0.69137.19 ▼4.72111.14 ▼6.09
Posts /wp-admin/edit.php2,812 ▲732.70 ▼0.0165.10 ▼2.66103.63 ▲12.05
Add New Post /wp-admin/post-new.php1,733 ▲6118.88 ▼0.02365.90 ▼13.01124.53 ▲21.82
Media Library /wp-admin/upload.php1,880 ▲735.47 ▲0.42127.67 ▼22.20122.01 ▲1.07
Essential Kit /wp-admin/admin.php?page=ocwcp_kit2,5062.6658.46108.77
WC Custom Order Status /wp-admin/admin.php?page=wc-custom-order-status1,7512.9076.87115.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% 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 | 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wc-custom-order-status-per-product/wc-custom-order-status-per-product.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wc-custom-order-status
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=5.8.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/admin.php?page=wc-custom-order-status
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=5.8.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/admin.php?page=wc-custom-order-status
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=5.8.1+1:283
    wpColorPickerL10n.clear is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/admin.php?page=wc-custom-order-status
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=5.8.1+1:283
    wpColorPickerL10n.clearAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt might help

wc-custom-order-status-per-product/wc-custom-order-status-per-product.php Passed 13 tests

"Custom Order Status Per Product WooCommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
60 characters long description:
This plugin allows to create custom order status and more...

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
Good job! No executable or dangerous file extensions detected863 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP413013689
CSS2122167
JavaScript22106
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity18.75
▷ Minimum class complexity5.00
▷ Maximum class complexity44.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods39.38%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/review.png15.87KB11.90KB▼ 25.01%
images/star.png39.75KB10.35KB▼ 73.95%
images/support.png6.44KB5.59KB▼ 13.09%