67% mercado

Code Review | Mercado - Turn your WooCommerce into MultiVendor MarketPlace

WordPress plugin Mercado - Turn your WooCommerce into MultiVendor MarketPlace scored67%from 54 tests.

About plugin

  • Plugin page: mercado
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Oct 15, 2020
  • Latest release: Oct 27, 2023
  • Number of updates: 19
  • Update frequency: every 59.8 days
  • Top authors: redefiningtheweb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /4,383 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Mercado - Turn your WooCommerce into MultiVendor MarketPlace
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.58 ▼6.24
Dashboard /wp-admin3.31 ▼0.0442.27 ▼20.07
Posts /wp-admin/edit.php3.36 ▲0.0043.51 ▼2.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.23 ▼14.18
Media Library /wp-admin/upload.php3.23 ▲0.0031.40 ▼5.66

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

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

Browser metrics Passed 4 tests

Mercado - Turn your WooCommerce into MultiVendor MarketPlace: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▲0.031.63 ▼0.2538.41 ▼7.59
Dashboard /wp-admin2,198 ▲185.62 ▼0.0482.20 ▼2.1241.10 ▲0.57
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0534.92 ▼0.4535.87 ▼0.41
Add New Post /wp-admin/post-new.php1,527 ▲123.21 ▲0.16595.71 ▼86.9950.10 ▼3.24
Media Library /wp-admin/upload.php1,403 ▼04.23 ▲0.0299.51 ▼2.5241.28 ▼3.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mercado/admin/partials/menu/rtwmer-mercado-dashboard.php
    • > /wp-content/plugins/mercado/assets/sdk/Stripe/build.php
  • 364× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/mercado/assets/sdk/Stripe/lib/Exception/SignatureVerificationException.php:9
    • > PHP Warning
      include_once(): Failed opening 'RTWMER_ADMIN_PARTIAL_SUBMENUrtwmer-mercado-payment-gateway.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mercado/admin/partials/menu/rtwmer-mercado-settings.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/mercado/public/partials/rtwmer_Vendor_Store/rtwmer_Vendor_Store_shortcode_cb.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/mercado/assets/sdk/Stripe/lib/BitcoinReceiver.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/mercado/assets/sdk/Stripe/lib/Service/Terminal/ConfigurationService.php:7
    • > PHP Warning
      include_once(): Failed opening 'RTWMER_ADMIN_PARTIAL/ssp/ssp.customized.class.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mercado/admin/partials/admin-includes/rtwmer-mercado-order-table.php on line 224
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/mercado/assets/sdk/Stripe/lib/Service/Tax/TransactionService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/mercado/assets/sdk/Stripe/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/mercado/assets/sdk/Stripe/lib/Service/BillingPortal/ConfigurationService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/mercado/assets/sdk/Stripe/lib/CreditNoteLineItem.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Requires php: Version not formatted correctly
Please take inspiration from this readme.txt

mercado/rtwmer-mercado.php 69% from 13 tests

The primary PHP file in "Mercado - Turn your WooCommerce into MultiVendor MarketPlace" version 1.5.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Plugin Name: Please shorten the plugin name (currently 82 characters long instead of max. 70)
  • Main file name: Name the main plugin file the same as the plugin slug ("mercado.php" instead of "rtwmer-mercado.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "4.2.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/mercado/assets/sdk/Stripe/data/ca-certificates.crt
56,052 lines of code in 429 files:
LanguageFilesBlank linesComment linesLines of code
PHP3634,76713,13825,114
CSS233,68945516,859
JavaScript392,3731,46612,469
Markdown277801,518
JSON10048
XML11044

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity6.77
▷ Minimum class complexity1.00
▷ Maximum class complexity756.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces38
Interfaces9
Traits9
Classes294
▷ Abstract classes113.74%
▷ Concrete classes28396.26%
▷ Final classes00.00%
Methods1,092
▷ Static methods20718.96%
▷ Public methods1,00391.85%
▷ Protected methods413.75%
▷ Private methods484.40%
Functions16
▷ Named functions318.75%
▷ Anonymous functions1381.25%
Constants1,049
▷ Global constants212.00%
▷ Class constants1,02898.00%
▷ Public constants1,028100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/sort_both.png0.20KB0.29KB0.00%
public/css/images/new.png80.18KB9.40KB▼ 88.27%
public/css/images/rtwmer_store_privacy.png1.22KB1.07KB▼ 12.92%
public/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
admin/images/mercado_icon.png1.36KB0.56KB▼ 59.13%