84% marketplace-for-woocommerce

Code Review | Marketplace for WooCommerce

WordPress plugin Marketplace for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: marketplace-for-w...
  • Plugin version: 1.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Nov 24, 2023
  • Number of updates: 76
  • Update frequency: every 31.3 days
  • Top authors: algoritmika (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /8,136 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Marketplace for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.89 ▼6.97
Dashboard /wp-admin3.32 ▲0.0144.85 ▼7.78
Posts /wp-admin/edit.php3.37 ▲0.0146.91 ▼2.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.60 ▼9.21
Media Library /wp-admin/upload.php3.24 ▲0.0134.87 ▲0.39

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 177 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Marketplace for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.10 ▼0.201.90 ▲0.1838.58 ▼6.28
Dashboard /wp-admin2,195 ▲275.61 ▼0.0392.45 ▼0.1742.15 ▼0.84
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0040.32 ▲1.5736.55 ▼0.46
Add New Post /wp-admin/post-new.php1,526 ▼023.35 ▲0.12656.31 ▲53.0654.84 ▼18.48
Media Library /wp-admin/upload.php1,403 ▲94.17 ▼0.0696.11 ▼4.3842.93 ▲0.94

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 45× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/marketplace-for-woocommerce/vendor/cmb2/cmb2/includes/helper-functions.php:131
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/marketplace-for-woocommerce/vendor/cmb2/cmb2/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/marketplace-for-woocommerce/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/marketplace-for-woocommerce/vendor/cmb2/cmb2/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/marketplace-for-woocommerce/vendor/mustardBees/cmb-field-select2/cmb-field-select2.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/marketplace-for-woocommerce/vendor/cmb2/cmb2/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/marketplace-for-woocommerce/vendor/cmb2/cmb2/includes/types/CMB2_Type_Colorpicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/marketplace-for-woocommerce/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Select' not found in wp-content/plugins/marketplace-for-woocommerce/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/marketplace-for-woocommerce/classes/marketplace/user_roles/vendor_user/class-alg-mpwc-vendor-registration-email.php:12

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 96% 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
4 plugin tags: woocommerce, marketplace, multivendor, vendors

marketplace-for-woocommerce/marketplace-for-woocommerce.php 92% from 13 tests

"Marketplace for WooCommerce" version 1.5.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "6.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected19,282 lines of code in 144 files:
LanguageFilesBlank linesComment linesLines of code
PHP993,0348,42711,266
CSS142511,1904,563
JavaScript93796001,562
Sass17306291,411
PO File1113135271
JSON400209

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.99
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes102
▷ Abstract classes98.82%
▷ Concrete classes9391.18%
▷ Final classes00.00%
Methods794
▷ Static methods11914.99%
▷ Public methods69287.15%
▷ Protected methods9712.22%
▷ Private methods50.63%
Functions29
▷ Named functions2689.66%
▷ Anonymous functions310.34%
Constants60
▷ Global constants46.67%
▷ Class constants5693.33%
▷ Public constants56100.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
18 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
vendor/cmb2/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
vendor/mustardBees/cmb-field-select2/screenshot-2.png4.91KB4.88KB▼ 0.74%