90% set-custom-order-number

Code Review | Custom order number for WooCommerce

WordPress plugin Custom order number for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: set-custom-order-...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 2, 2020
  • Latest release: Apr 25, 2023
  • Number of updates: 15
  • Update frequency: every 58.3 days
  • Top authors: sunarc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.79ms] Passed 4 tests

Analyzing server-side resources used by Custom order number for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.56 ▼1.25
Dashboard /wp-admin3.31 ▼0.0443.57 ▼13.27
Posts /wp-admin/edit.php3.36 ▲0.0046.74 ▲0.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.54 ▼10.11
Media Library /wp-admin/upload.php3.23 ▲0.0033.04 ▼2.52

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
scon_sunarc_enabled

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom order number for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.491.70 ▲0.0841.31 ▼0.36
Dashboard /wp-admin2,206 ▲145.88 ▲0.9695.71 ▼6.6537.90 ▼5.76
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0138.84 ▼7.0334.55 ▼5.22
Add New Post /wp-admin/post-new.php1,521 ▼722.76 ▲4.35632.49 ▲10.5058.62 ▲3.27
Media Library /wp-admin/upload.php1,391 ▲34.17 ▲0.0794.18 ▼1.9541.09 ▼1.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • scon_sunarc_enabled
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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

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

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: suffix, custom order number, order number, prefix, orders...

set-custom-order-number/custom-order-number.php 92% from 13 tests

This is the main PHP file of "Custom order number for WooCommerce" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("set-custom-order-number.php" instead of "custom-order-number.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin203 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22554185
JavaScript10118

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods545.45%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.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
There are no PNG files in this plugin