84% woo-customer-order-status

Code Review | Woocommerce Customer Order Status

WordPress plugin Woocommerce Customer Order Status scored84%from 54 tests.

About plugin

  • Plugin page: woo-customer-orde...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Apr 24, 2017
  • Latest release: Apr 24, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: purvik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /643 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.42ms] Passed 4 tests

This is a short check of server-side resources used by Woocommerce Customer Order Status
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.87 ▼3.55
Dashboard /wp-admin3.32 ▲0.0242.66 ▼4.78
Posts /wp-admin/edit.php3.37 ▲0.0146.68 ▲1.57
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.97 ▼1.07
Media Library /wp-admin/upload.php3.24 ▲0.0131.27 ▼4.27
WC Order Status /wp-admin/options-general.php?page=wc_total_order_status3.2429.37

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Customer Order Status
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.17 ▼0.481.90 ▲0.3139.11 ▼11.95
Dashboard /wp-admin2,204 ▲245.51 ▼0.1585.98 ▼13.6138.53 ▼2.60
Posts /wp-admin/edit.php2,112 ▲92.02 ▲0.0139.85 ▲1.2736.54 ▲3.59
Add New Post /wp-admin/post-new.php1,537 ▲923.61 ▲0.51669.25 ▼17.0254.40 ▼0.24
Media Library /wp-admin/upload.php1,412 ▲94.15 ▼0.03112.51 ▲10.0649.55 ▲4.16
WC Order Status /wp-admin/options-general.php?page=wc_total_order_status8292.0424.4525.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/woo-customer-order-status/admin/partials/wc-customer-order-status-admin-display.php:22

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)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
7 plugin tags: order status, previous order, order history, customer order, display order...

woo-customer-order-status/wc-customer-order-status.php 85% from 13 tests

The primary PHP file in "Woocommerce Customer Order Status" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-customer-order-status.php" instead of "wc-customer-order-status.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin260 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11123493256
JavaScript12273
CSS1141

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.83
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2184.00%
▷ Protected methods00.00%
▷ Private methods416.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin