84% wcfm-marketplace-rest-api

Code Review | WooCommerce Multivendor Marketplace - REST API

WordPress plugin WooCommerce Multivendor Marketplace - REST API scored84%from 54 tests.

About plugin

  • Plugin page: wcfm-marketplace-...
  • Plugin version: 1.6.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2018
  • Latest release: May 5, 2023
  • Number of updates: 51
  • Update frequency: every 31.5 days
  • Top authors: wclovers (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /79,422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.27ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Multivendor Marketplace - REST API
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.50 ▲3.18
Dashboard /wp-admin3.32 ▲0.0244.58 ▼5.91
Posts /wp-admin/edit.php3.37 ▲0.0244.44 ▼2.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.83 ▼15.59
Media Library /wp-admin/upload.php3.25 ▲0.0235.91 ▲2.92

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Multivendor Marketplace - REST API
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3114.17 ▼0.431.54 ▼0.3239.68 ▼1.53
Dashboard /wp-admin2,205 ▲255.56 ▼0.0083.74 ▼10.1841.34 ▲0.14
Posts /wp-admin/edit.php2,114 ▲141.99 ▲0.0534.54 ▼0.3632.24 ▼8.07
Add New Post /wp-admin/post-new.php1,548 ▲2218.56 ▼4.66606.62 ▼91.6075.97 ▲23.19
Media Library /wp-admin/upload.php1,416 ▲164.20 ▲0.0397.94 ▼3.1742.18 ▼5.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-order-controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-product-controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-review-controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-store_vendors-controller.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wcfm-marketplace-rest-api/helpers/wcfmapi-core-functions.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-wc_checkout-controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-product-attribute-controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-support-controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-notification-controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WCFM_REST_Controller' not found in wp-content/plugins/wcfm-marketplace-rest-api/includes/api/class-api-wc_cart-controller.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: rest api, http api, remote api, woocommerce marketplace api

wcfm-marketplace-rest-api/wcfm-marketplace-rest-api.php 92% from 13 tests

"WooCommerce Multivendor Marketplace - REST API" version 1.6.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "3.0.0")

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 detected4,840 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP271,2121,6914,840

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity38.83
▷ Minimum class complexity3.00
▷ Maximum class complexity202.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes00.00%
Methods227
▷ Static methods31.32%
▷ Public methods17175.33%
▷ Protected methods5122.47%
▷ Private methods52.20%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin