58% ns-marketplace-multi-vendor

Code Review | NS Marketplace Multi Vendor

WordPress plugin NS Marketplace Multi Vendor scored58%from 54 tests.

About plugin

  • Plugin page: ns-marketplace-mu...
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.3.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Apr 18, 2019
  • Latest release: Feb 11, 2022
  • Number of updates: 24
  • Update frequency: every 43.0 days
  • Top authors: nsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,121 total downloads

Benchmarks

Plugin footprint 48% from 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.75MB] [CPU: ▼25.26ms] Passed 4 tests

This is a short check of server-side resources used by NS Marketplace Multi Vendor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.82 ▼2.82
Dashboard /wp-admin3.20 ▼0.1437.81 ▼27.82
Posts /wp-admin/edit.php3.20 ▼0.1639.70 ▼8.73
Add New Post /wp-admin/post-new.php3.20 ▼2.6939.96 ▼61.66
Media Library /wp-admin/upload.php3.20 ▼0.0345.53 ▲10.28
/wp-admin/admin.php?page=plugineye2453.2040.22
How to install premium version /wp-admin/admin.php?page=ns-rac-graph-stats3.2041.91
Marketplace /wp-admin/admin.php?page=ns-marketplace-multi-vendor/ns-admin-options/ns_admin_option_dashboard.php3.2040.54

Server storage [IO: ▲3.32MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 83 new files
Database: 2 new tables, 14 new options
New tables
wp_ns_mmv_db_table_orders
wp_ns_mmv_db_table_vendors
New WordPress options
ns-vendor-products-dashboard-id
ns-vendor-become-vendor-id
woocommerce_myaccount_page_id
ns-vendor-add-product-id
theysaidso_admin_options
widget_recent-posts
ns_mmv_db_name_vendor
widget_recent-comments
widget_theysaidso_widget
ns_mmv_db_name
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for NS Marketplace Multi Vendor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲15713.56 ▼0.749.42 ▲7.2642.80 ▼0.44
Dashboard /wp-admin2,218 ▲415.60 ▼0.0890.29 ▼2.2269.66 ▲24.02
Posts /wp-admin/edit.php2,138 ▲382.04 ▲0.0135.77 ▼4.5835.46 ▲0.85
Add New Post /wp-admin/post-new.php1,712 ▲18623.06 ▲5.51717.39 ▲52.0962.61 ▲7.36
Media Library /wp-admin/upload.php1,435 ▲354.29 ▲0.12120.62 ▲11.3851.95 ▲3.30
/wp-admin/admin.php?page=plugineye2459202.0526.2125.83
How to install premium version /wp-admin/admin.php?page=ns-rac-graph-stats6911.537.9220.71
Marketplace /wp-admin/admin.php?page=ns-marketplace-multi-vendor/ns-admin-options/ns_admin_option_dashboard.php1,5249.54275.8575.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ns-marketplace-multi-vendor/ns-marketplace-multi-vendor.php+152
    Undefined index: primary
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_ns_mmv_db_table_vendors
    • wp_ns_mmv_db_table_orders
  • Zombie WordPress options detected upon uninstall: 14 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • ns_mmv_db_name
    • ns_mmv_db_name_vendor
    • widget_recent-comments
    • ns-vendor-products-dashboard-id
    • woocommerce_myaccount_page_id
    • ns-vendor-public-page-account-id
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ns-marketplace-multi-vendor/ns-admin-options/ns_admin_option_dashboard.php
    • > Notice in wp-content/plugins/ns-marketplace-multi-vendor/ns-marketplace-multi-vendor.php+152
    Undefined index: primary
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ns-rac-graph-stats
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)
    • > GET request to /wp-admin/admin.php?page=ns-marketplace-multi-vendor/ns-admin-options/ns_admin_option_dashboard.php
    • > Notice in wp-content/plugins/ns-marketplace-multi-vendor/ns-admin-options/ns_settings_custom.php+46
    Undefined variable: ns_coupon_name
    • > GET request to /wp-admin/admin.php?page=ns-marketplace-multi-vendor/ns-admin-options/ns_admin_option_dashboard.php
    • > Notice in wp-content/plugins/ns-marketplace-multi-vendor/ns-admin-options/ns_settings_custom.php+49
    Undefined variable: ns_popup_title
    • > GET request to /wp-admin/admin.php?page=ns-marketplace-multi-vendor/ns-admin-options/ns_admin_option_dashboard.php
    • > Notice in wp-content/plugins/ns-marketplace-multi-vendor/ns-admin-options/ns_settings_custom.php+52
    Undefined variable: ns_popup_subtitle
    • > GET request to /wp-admin/admin.php?page=ns-marketplace-multi-vendor/ns-admin-options/ns_admin_option_dashboard.php
    • > Notice in wp-content/plugins/ns-marketplace-multi-vendor/ns-admin-options/ns_settings_custom.php+57
    Undefined variable: checked
    • > GET request to /wp-admin/admin.php?page=ns-marketplace-multi-vendor/ns-admin-options/ns_admin_option_dashboard.php
    • > Notice in wp-content/plugins/ns-marketplace-multi-vendor/ns-admin-options/ns_settings_custom.php+62
    Undefined variable: ns_popup_privacy_policy

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-marketplace-multi-vendor/ns-frontend-add-product-premium/ns-frontend-add-product-add-cat-product-ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-marketplace-multi-vendor/ns-frontend-add-product-premium/ns-frontend-add-product-add-to-gallery-ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-marketplace-multi-vendor/ns-vendor/ns-marketplace-multi-vendor-ajax-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ns-marketplace-multi-vendor/ns-admin-options/inc.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-marketplace-multi-vendor/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ns-marketplace-multi-vendor/ns-vendor/ns-marketplace-multi-vendor-db-table.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-marketplace-multi-vendor/ns-vendor/ns-marketplace-multi-vendor-orders-functions.php:127

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Custom WooCommerce Registration.), #2 ("My Products" Page.), #3 (Vendor Account Page.), #4 ("Add Product Page".)
You can look at the official readme.txt

ns-marketplace-multi-vendor/ns-marketplace-multi-vendor.php Passed 13 tests

The main file in "NS Marketplace Multi Vendor" v. 1.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
44 characters long description:
This plugin allows you to create your vendor

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected14,522 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
SVG50148,698
PHP305204963,162
CSS92381051,693
JavaScript12151119874
PO File1486295

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods526.32%
▷ Protected methods00.00%
▷ Private methods1473.68%
Functions89
▷ Named functions7887.64%
▷ Anonymous functions1112.36%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.27MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png119.78KB42.49KB▼ 64.52%
ns-admin-options/img/backend-sidebar-icon.png1.48KB0.54KB▼ 63.47%
screenshot-3.png65.87KB20.24KB▼ 69.27%
img/plus.png1.72KB1.66KB▼ 3.96%
screenshot-4.png41.75KB12.38KB▼ 70.35%