84% woo-custom-and-sequential-order-number

Code Review | Woo Custom and Sequential Order Number

WordPress plugin Woo Custom and Sequential Order Number scored84%from 54 tests.

About plugin

  • Plugin page: woo-custom-and-se...
  • Plugin version: 2.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.7
  • WordPress version: 6.3.1
  • First release: Nov 14, 2016
  • Latest release: Mar 13, 2021
  • Number of updates: 29
  • Update frequency: every 54.6 days
  • Top authors: vjinfotech (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /33,283 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.64ms] Passed 4 tests

Server-side resources used by Woo Custom and Sequential Order Number
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1241.15 ▼9.09
Dashboard /wp-admin3.42 ▲0.1151.16 ▲0.44
Posts /wp-admin/edit.php3.54 ▲0.1748.13 ▼3.39
Add New Post /wp-admin/post-new.php6.00 ▲0.1186.38 ▼18.52
Media Library /wp-admin/upload.php3.34 ▲0.1138.34 ▲1.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Woo Custom and Sequential Order Number
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.20 ▼0.381.72 ▲0.0245.25 ▲1.58
Dashboard /wp-admin2,195 ▲185.62 ▲0.0393.41 ▲6.4144.45 ▼1.29
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0235.85 ▼0.6133.24 ▲1.36
Add New Post /wp-admin/post-new.php1,547 ▲1623.36 ▲0.03708.83 ▲20.0451.55 ▼5.39
Media Library /wp-admin/upload.php1,397 ▼04.19 ▼0.0599.90 ▼2.0442.74 ▼1.52

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 were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-custom-and-sequential-order-number/includes/classes/class-wcson-init.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-custom-and-sequential-order-number/includes/classes/class-wcson-order-number.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-custom-and-sequential-order-number/woo-custom-and-sequential-order-number.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-custom-and-sequential-order-number/includes/views/wcson-order-number.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
8 plugin tags: order number, sequential order, sequential number, order, woocommerce order...

woo-custom-and-sequential-order-number/woo-custom-and-sequential-order-number.php Passed 13 tests

This is the main PHP file of "Woo Custom and Sequential Order Number" version 2.6.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
74 characters long description:
Generates Custom and Sequential Order Numbers for WooCommerce Store Orders

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin8,165 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,6581,3466,652
PHP524244925
CSS31618415
HTML1174173

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity41.50
▷ Minimum class complexity27.00
▷ Maximum class complexity56.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods4193.18%
▷ Public methods3068.18%
▷ Protected methods00.00%
▷ Private methods1431.82%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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
6 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
documentation/assets/images/vjinfotech.png21.98KB6.04KB▼ 72.51%
documentation/assets/images/Wcson-Setup-and-Configuration.png36.81KB12.19KB▼ 66.89%
documentation/assets/css/img/info.png0.67KB0.70KB0.00%
documentation/assets/images/wcson-license.png12.40KB4.46KB▼ 64.05%
documentation/assets/css/img/warning.png0.59KB0.50KB▼ 14.99%