84% multi-order-for-woocommerce

Code Review | Multi Order for WooCommerce

WordPress plugin Multi Order for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: multi-order-for-w...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Jul 15, 2023
  • Number of updates: 44
  • Update frequency: every 50.3 days
  • Top authors: wpwham (56.82%)algoritmika (45.45%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /7,175 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Multi Order for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.09 ▼2.00
Dashboard /wp-admin3.31 ▲0.0142.79 ▼10.52
Posts /wp-admin/edit.php3.36 ▲0.0145.99 ▼1.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.78 ▼11.39
Media Library /wp-admin/upload.php3.23 ▲0.0131.08 ▼5.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 388 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Multi Order for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.31 ▼1.061.63 ▼0.6243.67 ▼4.92
Dashboard /wp-admin2,206 ▲184.86 ▼0.05102.60 ▼11.8837.83 ▼8.52
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0034.18 ▼2.3934.04 ▲0.31
Add New Post /wp-admin/post-new.php1,533 ▲1923.15 ▲5.55670.34 ▼22.5057.89 ▼1.88
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0892.97 ▼9.2443.52 ▼3.75

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 43× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/multi-order-for-woocommerce/classes/multiorder/class-alg-mowc-order-pay-status-bkg-process.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/multi-order-for-woocommerce/vendor/CMB2/CMB2/includes/CMB2_Hookup.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Plugin's settings (WooCommerce > Settings > Multi Order)) image not found
The official readme.txt might help

multi-order-for-woocommerce/multi-order-for-woocommerce.php 92% from 13 tests

"Multi Order for WooCommerce" version 1.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.4" instead of "3.0")

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
Everything looks great! No dangerous files found in this plugin48,663 lines of code in 240 files:
LanguageFilesBlank linesComment linesLines of code
PO File12114,38418,58432,485
PHP792,5257,7278,677
CSS142511,1904,563
JavaScript93795931,527
Sass17306291,411

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity17.28
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes89
▷ Abstract classes910.11%
▷ Concrete classes8089.89%
▷ Final classes00.00%
Methods656
▷ Static methods9714.79%
▷ Public methods55784.91%
▷ Protected methods9514.48%
▷ Private methods40.61%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants39
▷ Global constants37.69%
▷ Class constants3692.31%
▷ Public constants36100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/CMB2/CMB2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vendor/CMB2/CMB2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vendor/CMB2/CMB2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
vendor/CMB2/CMB2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
vendor/CMB2/CMB2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%