77% wc-vendors

Code Review | WC Vendors - WooCommerce Multi-Vendor, WooCommerce Marketplace, Product Vendors

WordPress plugin WC Vendors - WooCommerce Multi-Vendor, WooCommerce Marketplace, Product Vendors scored77%from 54 tests.

About plugin

  • Plugin page: wc-vendors
  • Plugin version: 2.4.7.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 15, 2014
  • Latest release: Nov 20, 2023
  • Number of updates: 327
  • Update frequency: every 10.3 days
  • Top authors: digitalchild (96.94%)jkohlbach (2.75%)

Code review

54 tests

User reviews

163 reviews

Install metrics

7,000+ active /763,815 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.10MB] [CPU: ▼1.77ms] Passed 4 tests

An overview of server-side resources used by WC Vendors - WooCommerce Multi-Vendor, WooCommerce Marketplace, Product Vendors
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.36 ▼2.75
Dashboard /wp-admin3.41 ▲0.1044.71 ▼3.35
Posts /wp-admin/edit.php3.52 ▲0.1647.11 ▲2.26
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.13 ▼2.98
Media Library /wp-admin/upload.php3.33 ▲0.1035.90 ▲2.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 289 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WC Vendors - WooCommerce Multi-Vendor, WooCommerce Marketplace, Product Vendors
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5014.67 ▲0.352.04 ▲0.3243.08 ▼5.26
Dashboard /wp-admin2,196 ▲195.49 ▼0.1096.02 ▼1.2343.58 ▲3.23
Posts /wp-admin/edit.php2,107 ▲72.10 ▲0.0938.59 ▲2.6036.73 ▼2.52
Add New Post /wp-admin/post-new.php1,533 ▲723.00 ▼0.17650.17 ▼33.6761.60 ▲14.19
Media Library /wp-admin/upload.php1,404 ▲44.26 ▲0.0396.82 ▲2.6340.95 ▲0.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • 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 | 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wc-vendors/templates/emails/new-product.php
    • > /wp-content/plugins/wc-vendors/templates/emails/application-status.php
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'PPUtils.php' (include_path='.:/usr/share/php') in wp-content/plugins/wc-vendors/classes/gateways/PayPal_Masspay/api/lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wc-vendors/classes/admin/class-vendor-admin-dashboard.php on line 274
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wc-vendors/classes/admin/views/html-vendor-settings-page.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-vendors/classes/admin/class-wcv-commissions-page.php on line 12
    • > PHP Notice
      Undefined variable: display_mode in wp-content/plugins/wc-vendors/templates/front/vendor-list-filter.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-vendors/classes/class-install.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'WCV_Vendor_Signup' not found in wp-content/plugins/wc-vendors/classes/front/account/class-wc-account-links.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-vendors/class-wc-vendors.php:45
    • > PHP Warning
      require_once(PPUtils.php): failed to open stream: No such file or directory in wp-content/plugins/wc-vendors/classes/gateways/PayPal_Masspay/api/lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php on line 7
    • > PHP Warning
      require_once(PPUtils.php): failed to open stream: No such file or directory in wp-content/plugins/wc-vendors/classes/gateways/PayPal_AdvPayments/PayPal_AP/classes/adaptivepayments-sdk/lib/services/AdaptivePayments/AdaptivePayments.php on line 7

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

wc-vendors/class-wc-vendors.php 85% from 13 tests

Analyzing the main PHP file in "WC Vendors - WooCommerce Multi-Vendor, WooCommerce Marketplace, Product Vendors" version 2.4.7.3
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.5.0" instead of "5.3.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-vendors.php" instead of "class-wc-vendors.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected60,654 lines of code in 232 files:
LanguageFilesBlank linesComment linesLines of code
PHP1819,54917,81432,473
PO File1410,31220,75025,076
Sass610022,533
JavaScript12609345
Markdown345077
XML10074
INI271642
Ant17017
CSS1201717

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 118)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity11.14
▷ Minimum class complexity1.00
▷ Maximum class complexity147.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity118.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes536
▷ Abstract classes71.31%
▷ Concrete classes52998.69%
▷ Final classes00.00%
Methods1,501
▷ Static methods20113.39%
▷ Public methods1,43595.60%
▷ Protected methods130.87%
▷ Private methods533.53%
Functions52
▷ Named functions4586.54%
▷ Anonymous functions713.46%
Constants27
▷ Global constants933.33%
▷ Class constants1866.67%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.34MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/extensions/bcgearexchange.png0.26KB0.13KB▼ 51.50%
assets/images/extensions/cody.png0.26KB0.13KB▼ 48.11%
assets/images/extensions/payment.png15.71KB5.69KB▼ 63.76%
assets/images/extensions/shipping.png16.26KB6.13KB▼ 62.26%
assets/images/extensions/wcvendors_dashboard.png22.46KB6.21KB▼ 72.34%