83% ni-woocommerce-custom-order-status

Code Review | Ni WooCommerce Custom Order Status

WordPress plugin Ni WooCommerce Custom Order Status scored83%from 54 tests.

About plugin

  • Plugin page: ni-woocommerce-cu...
  • Plugin version: 2.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2015
  • Latest release: Nov 23, 2023
  • Number of updates: 73
  • Update frequency: every 40.4 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

3,000+ active /57,610 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼4.00ms] Passed 4 tests

A check of server-side resources used by Ni WooCommerce Custom Order Status
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1438.24 ▼6.19
Dashboard /wp-admin3.45 ▲0.1446.69 ▼5.68
Posts /wp-admin/edit.php3.57 ▲0.2049.04 ▲1.63
Add New Post /wp-admin/post-new.php6.03 ▲0.1494.03 ▲0.93
Media Library /wp-admin/upload.php3.38 ▲0.1435.03 ▼5.04
Order Status /wp-admin/edit.php?post_type=ni-order-status3.4238.96
Dashboard /wp-admin/admin.php?page=ni-custom-order-status-report3.7633.54
Other Plugins /wp-admin/admin.php?page=niwoocos-other-plugins3.3732.77
Order Status Report /wp-admin/admin.php?page=niwoocos-order-status-report3.4631.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 7 new options
New WordPress options
recovery_mode_email_last_sent
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Ni WooCommerce Custom Order Status
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.25 ▼0.101.67 ▼0.2236.08 ▼7.26
Dashboard /wp-admin2,229 ▲585.53 ▼0.1592.87 ▲0.9962.01 ▲22.30
Posts /wp-admin/edit.php2,137 ▲371.99 ▲0.0539.07 ▼3.7435.01 ▼1.85
Add New Post /wp-admin/post-new.php1,571 ▲4523.13 ▼0.26755.63 ▲62.6757.82 ▼4.23
Media Library /wp-admin/upload.php1,434 ▲314.14 ▼0.0498.10 ▼10.8872.17 ▲26.17
Order Status /wp-admin/edit.php?post_type=ni-order-status1,1472.4648.2530.44
Dashboard /wp-admin/admin.php?page=ni-custom-order-status-report1,4511.4211.2499.55
Other Plugins /wp-admin/admin.php?page=niwoocos-other-plugins1,1421.9030.7036.73
Order Status Report /wp-admin/admin.php?page=niwoocos-order-status-report7321.459.1623.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=ni-custom-order-status-report
    • > Error in wp-content/plugins/ni-woocommerce-custom-order-status/include/ni-custom-order-status-report.php+281
    Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/ni-woocommerce-custom-order-status/include/ni-custom-order-status-report.php:281
    Stack trace:
    #0 wp-content/plugins/ni-woocommerce-custom-order-status/include/ni-custom-order-status-init.php(131): ni_custom_order_status_report->page_init()
    #1 wp-includes/class-wp-hook.php(310): ni_custom_order_status_init->add_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=niwoocos-order-status-report
    • > Error in wp-content/plugins/ni-woocommerce-custom-order-status/include/ni-order-status-report.php+131
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/ni-woocommerce-custom-order-status/include/ni-order-status-report.php:131
    Stack trace:
    #0 wp-content/plugins/ni-woocommerce-custom-order-status/include/ni-order-status-report.php(9): Ni_Order_Status_Report->get_order_status()
    #1 wp-content/plugins/ni-woocommerce-custom-order-status/include/ni-custom-order-status-init.php(143): Ni_Order_Status_Report->page_init()
    #2 wp-includes/class-wp-hook.php(310): ni_custom_order_status_init->add_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Order Status List.), #2 (Add New Order Status.), #3 (Sales Analysis Dashboard (Today sales, this month sales, this year sales count and total)), #4 (Recent order list), #5 (Order status sales report), #6 (Payment gateway sales report pie chart), #7 (Bulk order status update), #8 (Order Status Report), #9 (Order status email setting)
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

ni-woocommerce-custom-order-status/ni-woocommerce-custom-order-status.php 69% from 13 tests

The primary PHP file in "Ni WooCommerce Custom Order Status" version 2.2.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages/")

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 detected9,005 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS5851003,811
SVG1002,671
PHP95041282,471
JavaScript4241952

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity26.50
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods79
▷ Static methods00.00%
▷ Public methods79100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.42MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png31.41KB19.77KB▼ 37.04%
screenshot-5.png51.04KB14.44KB▼ 71.71%
screenshot-1.png55.41KB17.40KB▼ 68.59%
screenshot-2.png59.30KB18.37KB▼ 69.03%
screenshot-6.png45.36KB13.65KB▼ 69.92%