78% woomulti

Code Review | WooMulti

WordPress plugin WooMulti scored78%from 54 tests.

About plugin

  • Plugin page: woomulti
  • Plugin version: 1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0.2
  • WordPress version: 6.3.1
  • First release: Dec 26, 2018
  • Latest release: Jan 17, 2019
  • Number of updates: 8
  • Update frequency: every 2.9 days
  • Top authors: buznetwork (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /735 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.38MB] [CPU: ▼14.39ms] Passed 4 tests

A check of server-side resources used by WooMulti
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3446.92 ▲2.26
Dashboard /wp-admin3.63 ▲0.3354.31 ▼2.30
Posts /wp-admin/edit.php3.69 ▲0.3353.62 ▲3.17
Add New Post /wp-admin/post-new.php3.45 ▼2.4440.16 ▼60.67
Media Library /wp-admin/upload.php3.49 ▲0.2746.12 ▲6.65

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 830 new files
Database: 3 new tables, 6 new options
New tables
wp_gbwm_sites
wp_gbwm_couriers
wp_gbwm_templates
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

WooMulti: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.28 ▼0.291.78 ▼0.0043.28 ▼0.80
Dashboard /wp-admin2,207 ▲275.59 ▼0.0887.60 ▼3.7341.22 ▼2.78
Posts /wp-admin/edit.php2,115 ▲182.01 ▲0.0634.06 ▼2.1833.12 ▼1.73
Add New Post /wp-admin/post-new.php1,536 ▲1023.30 ▲0.32666.62 ▲20.4450.34 ▼9.13
Media Library /wp-admin/upload.php1,415 ▲124.18 ▼0.0594.10 ▼3.3744.80 ▲3.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woomulti/vendor/sabberworm/php-css-parser/tests/quickdump.php
    • > /wp-content/plugins/woomulti/vendor/automattic/woocommerce/tests/bootstrap.php
  • 414× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\Header' not found in wp-content/plugins/woomulti/vendor/phenx/php-font-lib/src/FontLib/WOFF/Header.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/woomulti/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/CSSString.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpWord\\Writer\\Word2007\\Style\\AbstractStyle' not found in wp-content/plugins/woomulti/vendor/phpoffice/phpword/src/PhpWord/Writer/Word2007/Style/Tab.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpWord\\Element\\AbstractContainer' not found in wp-content/plugins/woomulti/vendor/phpoffice/phpword/src/PhpWord/Element/Footer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woomulti/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/RequestTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpWord\\Exception\\Exception' not found in wp-content/plugins/woomulti/vendor/phpoffice/phpword/src/PhpWord/Exception/CopyFileException.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpWord\\Shared\\AbstractEnum' not found in wp-content/plugins/woomulti/vendor/phpoffice/phpword/src/PhpWord/SimpleType/NumberFormat.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'LayerShifter\\TLDDatabase\\Exceptions\\Exception' not found in wp-content/plugins/woomulti/vendor/layershifter/tld-database/src/Exceptions/IOException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/woomulti/vendor/phenx/php-font-lib/src/FontLib/Table/Type/glyf.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woomulti/vendor/layershifter/tld-support/tests/Helpers/StrTest.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: orders, multi site order managment, woocommerce, multi site, multi store...

woomulti/genbuz-woomulti.php 85% from 13 tests

"WooMulti" version 1.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woomulti.php" instead of "genbuz-woomulti.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin96,750 lines of code in 701 files:
LanguageFilesBlank linesComment linesLines of code
PHP59719,05542,09882,716
JavaScript82,1891,0355,185
CSS387002564,699
Markdown1955401,871
JSON16001,315
PO File1177228468
XML1054292
YAML93418151
Bourne Shell111028
HTML10017
SVG1008

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.56
▷ Minimum class complexity1.00
▷ Maximum class complexity765.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces90
Interfaces12
Traits0
Classes556
▷ Abstract classes397.01%
▷ Concrete classes51792.99%
▷ Final classes244.64%
Methods4,089
▷ Static methods3418.34%
▷ Public methods3,41783.57%
▷ Protected methods3318.09%
▷ Private methods3418.34%
Functions86
▷ Named functions5867.44%
▷ Anonymous functions2832.56%
Constants789
▷ Global constants14117.87%
▷ Class constants64882.13%
▷ Public constants648100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-bg_highlight-soft_100_ffffff_1x100.png0.20KB0.08KB▼ 58.62%
assets/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.41KB0.15KB▼ 62.44%
assets/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%
vendor/phpoffice/common/tests/resources/images/PHPPowerPointLogo.png4.74KB4.08KB▼ 14.02%
vendor/layershifter/tld-database/logo.png11.31KB4.89KB▼ 56.78%