87% yith-woocommerce-product-vendors

Code Review | YITH WooCommerce Multi Vendor

WordPress plugin YITH WooCommerce Multi Vendor scored 87% from 54 tests.

About plugin

  • Plugin page: yith-woocommerce-...
  • Plugin version: 3.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 5.8.1
  • First release: Mar 25, 2015
  • Latest release: Oct 13, 2021
  • Number of updates: 239
  • Update frequency: every 10.0 days
  • Top authors: yithemes (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active / 205,371 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by YITH WooCommerce Multi Vendor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.55 ▲11.11
Dashboard /wp-admin3.07 ▲0.0142.03 ▼6.18
Posts /wp-admin/edit.php3.12 ▲0.0136.93 ▼10.98
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.47 ▼557.46
Media Library /wp-admin/upload.php3.01 ▲0.0133.07 ▼4.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 413 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for YITH WooCommerce Multi Vendor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲11715.87 ▲0.2511.87 ▲1.2844.83 ▼1.04
Dashboard /wp-admin2,980 ▲465.92 ▼0.07138.61 ▼16.60107.64 ▼2.77
Posts /wp-admin/edit.php2,751 ▲122.72 ▲0.0164.46 ▼5.8389.76 ▲8.29
Add New Post /wp-admin/post-new.php1,621 ▼4921.27 ▲2.11313.54 ▼104.29105.18 ▼1.93
Media Library /wp-admin/upload.php1,817 ▲75.01 ▼0.03170.33 ▲20.02118.16 ▼0.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 13× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/class.yith-vendors-privacy.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/templates/admin/premium-tab.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/class.yith-commission.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/lib/class.yith-commissions-list-table.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/lib/class.yith-walker-category-dropdown.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/class.yith-vendors-admin.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/class.yith-orders.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/class.yith-vendor.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/modules/module.yith-hello-elementor-theme.php
    • > /wp-content/plugins/yith-woocommerce-product-vendors/includes/class.yith-vendors-frontend.php
  • 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/yith-woocommerce-product-vendors/includes/functions.yith-update.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_order() on null in wp-content/plugins/yith-woocommerce-product-vendors/templates/admin/commission-view.php:16
    • > PHP Warning
      Use of undefined constant YITH_WPV_URL - assumed 'YITH_WPV_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/yith-woocommerce-product-vendors/templates/admin/premium-tab.php on line 139
    • > PHP Warning
      Use of undefined constant YITH_WPV_URL - assumed 'YITH_WPV_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/yith-woocommerce-product-vendors/templates/admin/premium-tab.php on line 152
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/yith-woocommerce-product-vendors/templates/admin/edit-product-vendors-taxonomy.php:13
    • > PHP Notice
      Undefined variable: commission in wp-content/plugins/yith-woocommerce-product-vendors/templates/admin/commission-view.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/yith-woocommerce-product-vendors/templates/admin/vendor-admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/yith-woocommerce-product-vendors/plugin-options/commissions-options.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/yith-woocommerce-product-vendors/templates/admin/premium-tab.php:239
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/yith-woocommerce-product-vendors/plugin-options/accounts-privacy-options.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 37 tag instead of maximum 10
You can take inspiration from this readme.txt

yith-woocommerce-product-vendors/init.php 77% from 13 tests

"YITH WooCommerce Multi Vendor" version 3.9.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yith-woocommerce-product-vendors.php" instead of "init.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 436 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5" instead of "5.4")

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
Everything looks great! No dangerous files found in this plugin41,425 lines of code in 226 files:
LanguageFilesBlank linesComment linesLines of code
PHP1534,0508,08220,288
JavaScript461,2327908,829
CSS161,3742366,950
PO File74,1038,6945,286
XML210850
SVG20122

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity64.54
▷ Minimum class complexity1.00
▷ Maximum class complexity458.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes12.70%
▷ Concrete classes3697.30%
▷ Final classes00.00%
Methods617
▷ Static methods8714.10%
▷ Public methods56391.25%
▷ Protected methods365.83%
▷ Private methods182.92%
Functions180
▷ Named functions17697.78%
▷ Anonymous functions42.22%
Constants14
▷ Global constants1392.86%
▷ Class constants17.14%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
168 PNG files occupy 4.15MB with 2.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/08-bg.png6.29KB3.02KB▼ 52.06%
assets/images/23-bg.png3.55KB1.66KB▼ 53.21%
assets/images/12-icon.png1.42KB0.58KB▼ 58.90%
assets/images/06-bg.png6.13KB3.04KB▼ 50.38%
plugin-fw/assets/images/licence-error.png1.61KB0.94KB▼ 41.62%