10% split-order-by-weight-for-woocommerce

Code Review | Split order by weight for WooCommerce

WordPress plugin Split order by weight for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: split-order-by-we...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 6, 2020
  • Latest release: Apr 25, 2023
  • Number of updates: 13
  • Update frequency: every 71.6 days
  • Top authors: sunarc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /653 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/split-order-by-weight-for-woocommerce/index.php+80
    in_array() expects parameter 2 to be array, bool given

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.41ms] Passed 4 tests

Server-side resources used by Split order by weight for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.36 ▼5.33
Dashboard /wp-admin3.31 ▲0.0047.52 ▼0.91
Posts /wp-admin/edit.php3.36 ▲0.0048.38 ▼5.47
Add New Post /wp-admin/post-new.php5.89 ▲0.00100.96 ▼1.91
Media Library /wp-admin/upload.php3.23 ▲0.0035.36 ▲0.37

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Split order by weight for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.80 ▲0.431.64 ▼0.3539.11 ▼4.30
Dashboard /wp-admin2,200 ▲95.81 ▲0.7498.72 ▼5.3639.26 ▼5.26
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0438.99 ▼3.1135.79 ▲0.57
Add New Post /wp-admin/post-new.php1,514 ▼3017.47 ▼0.71646.10 ▲41.8869.55 ▲18.86
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.0396.48 ▼4.1043.85 ▼1.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • sow_splitorderbyweight
    • widget_theysaidso_widget
    • sow_auto_forced

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Congratulations! This plugin passed the SRP test

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: split order by weight, split, orders, woocommerce

split-order-by-weight-for-woocommerce/index.php 85% from 13 tests

"Split order by weight for WooCommerce" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("split-order-by-weight-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,271 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP61653181,193
JavaScript11444
CSS13034

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity7.00
▷ Maximum class complexity31.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods516.13%
▷ Public methods2683.87%
▷ Protected methods516.13%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin