84% advanced-custom-order-status-for-woocommerce

Code Review | Advanced Custom Order Status for WooCommerce

WordPress plugin Advanced Custom Order Status for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: advanced-custom-o...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 5
  • Update frequency: every 21.4 days
  • Top authors: storeplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /127 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.09MB] [CPU: ▲0.56ms] Passed 4 tests

An overview of server-side resources used by Advanced Custom Order Status for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0938.96 ▲2.26
Dashboard /wp-admin3.40 ▲0.0949.01 ▼0.83
Posts /wp-admin/edit.php3.51 ▲0.1548.81 ▲3.51
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.50 ▲0.22
Media Library /wp-admin/upload.php3.32 ▲0.0934.96 ▲0.61

Server storage [IO: ▲0.53MB] [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: 189 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Order Status for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5714.24 ▼0.021.77 ▲0.1837.71 ▲1.40
Dashboard /wp-admin2,210 ▲325.57 ▼0.1599.78 ▼15.0342.32 ▼1.63
Posts /wp-admin/edit.php2,121 ▲211.98 ▲0.0341.02 ▼0.9438.88 ▲3.47
Add New Post /wp-admin/post-new.php1,441 ▼8521.79 ▼1.36551.37 ▼56.9930.92 ▼19.31
Media Library /wp-admin/upload.php1,418 ▲214.15 ▼0.0795.97 ▼6.4137.25 ▼6.50

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 86× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'StorePlugin\\WcCustomOrderStatus\\Libs\\Exception\\GeneralExceptionInterface' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/includes/Libs/Exception/InvalidCallback.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'StorePlugin\\WcCustomOrderStatus\\Libs\\Exception\\GeneralExceptionInterface' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/includes/Libs/Exception/InvalidPath.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'StorePlugin\\WcCustomOrderStatus\\Libs\\Exception\\GeneralExceptionInterface' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/includes/Libs/Exception/InvalidService.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Source\\DefinitionSource' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/vendor/php-di/php-di/src/Definition/Source/SourceCache.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'StorePlugin\\WcCustomOrderStatus\\Libs\\Services\\ServiceInterface' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/includes/WcOrderStatus/RegisterOrderStatus.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Definition' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/vendor/php-di/php-di/src/Definition/FactoryDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/vendor/php-di/php-di/src/Container.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Source\\DefinitionSource' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/vendor/php-di/php-di/src/Definition/Source/MutableDefinitionSource.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'StorePlugin\\WcCustomOrderStatus\\Libs\\Main\\AbstractMain' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/includes/Loader.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'StorePlugin\\WcCustomOrderStatus\\Libs\\Exception\\GeneralExceptionInterface' not found in wp-content/plugins/advanced-custom-order-status-for-woocommerce/includes/Libs/Exception/PluginActivationFailure.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: custom order status, order status, woocommerce

advanced-custom-order-status-for-woocommerce/advanced-custom-order-status-for-woocommerce.php Passed 13 tests

"Advanced Custom Order Status for WooCommerce" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
136 characters long description:
The Advanced Custom Order Status for WooCommerce plugin empowers users to effortlessly manage and customize Order Status in WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected9,810 lines of code in 176 files:
LanguageFilesBlank linesComment linesLines of code
PHP1481,9644,4888,252
Markdown123230721
JSON700501
CSS23510154
YAML391132
XML29333
JavaScript222717

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity9.73
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces41
Interfaces21
Traits1
Classes113
▷ Abstract classes43.54%
▷ Concrete classes10996.46%
▷ Final classes1412.84%
Methods551
▷ Static methods7012.70%
▷ Public methods42977.86%
▷ Protected methods468.35%
▷ Private methods7613.79%
Functions55
▷ Named functions2850.91%
▷ Anonymous functions2749.09%
Constants27
▷ Global constants622.22%
▷ Class constants2177.78%
▷ Public constants1990.48%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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