94% woo-multi-order-creator

Code Review | Woo Multi Order Creator

WordPress plugin Woo Multi Order Creator scored 94% from 54 tests.

About plugin

  • Plugin page: woo-multi-order-c...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8
  • WordPress version: 5.8.1
  • First release: Mar 14, 2017
  • Latest release: Jul 19, 2017
  • Number of updates: 14
  • Update frequency: every 8.3 days
  • Top authors: ukwpexperts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 414 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

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

This is a short check of server-side resources used by Woo Multi Order Creator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.45 ▲11.75
Dashboard /wp-admin3.06 ▲0.0043.70 ▼1.61
Posts /wp-admin/edit.php3.11 ▲0.0045.44 ▼1.51
Add New Post /wp-admin/post-new.php5.42 ▼0.0287.30 ▼569.79
Media Library /wp-admin/upload.php3.00 ▲0.0033.16 ▼8.37

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Multi Order Creator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8415.89 ▲0.208.01 ▼2.7241.29 ▼8.50
Dashboard /wp-admin2,967 ▲335.96 ▼0.18150.17 ▲8.79106.44 ▼11.25
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0060.78 ▼0.3788.39 ▼10.22
Add New Post /wp-admin/post-new.php1,676 ▲418.84 ▲0.03374.95 ▼3.82113.91 ▲5.60
Media Library /wp-admin/upload.php1,810 ▼35.02 ▼0.03137.47 ▼7.09118.47 ▲1.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-multi-order-creator/admin/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woo-multi-order-creator/custom.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: woo multi order creator

woo-multi-order-creator/custom.php 92% from 13 tests

"Woo Multi Order Creator" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-multi-order-creator.php" instead of "custom.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected280 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21836280

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.51MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png38.24KB12.84KB▼ 66.41%
assets/screenshot-1.png28.35KB5.81KB▼ 79.49%
assets/banner-772x250.png60.63KB21.14KB▼ 65.13%
assets/screenshot-2.png58.76KB19.46KB▼ 66.87%
assets/banner1544x500-rtl.png126.49KB56.68KB▼ 55.19%