84% wc-order-split

Code Review | WC Order Split

WordPress plugin WC Order Split scored 84% from 54 tests.

About plugin

  • Plugin page: wc-order-split
  • Plugin version: 1.7.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2019
  • Latest release: May 24, 2023
  • Number of updates: 27
  • Update frequency: every 52.2 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active / 2,449 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
Installer ran successfully

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

Analyzing server-side resources used by WC Order Split
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.19 ▼0.33
Dashboard /wp-admin3.32 ▲0.0244.66 ▼4.56
Posts /wp-admin/edit.php3.37 ▲0.0146.38 ▲2.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.28 ▼10.12
Media Library /wp-admin/upload.php3.24 ▲0.0134.92 ▲0.99

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

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

Browser metrics Passed 4 tests

WC Order Split: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.84 ▲0.161.70 ▲0.0043.69 ▼3.64
Dashboard /wp-admin2,206 ▲215.91 ▼0.12108.68 ▲3.4537.45 ▼6.63
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0138.97 ▲4.9735.08 ▼1.73
Add New Post /wp-admin/post-new.php1,525 ▼823.34 ▲0.22679.68 ▲2.8162.65 ▲0.15
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.01105.41 ▲3.5646.84 ▼0.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-order-split/inc/wcos_color_settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-order-split/inc/wcos_settings.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
4 plugin tags: preorder, orders, split, order split

wc-order-split/index.php 92% from 13 tests

This is the main PHP file of "WC Order Split" version 1.7.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-order-split.php" instead of "index.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
There were no executable files found in this plugin10,921 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,546
PHP526574792
PO File3138141357
JavaScript34416129
CSS341097

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/colorpicker-help.png13.53KB18.34KB0.00%