78% multi-roles-vendor

Code Review | Multi Roles Vendor

WordPress plugin Multi Roles Vendor scored78%from 54 tests.

About plugin

  • Plugin page: multi-roles-vendor
  • Plugin version: 1.0.0
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 12, 2021
  • Latest release: Apr 12, 2022
  • Number of updates: 14
  • Update frequency: every 15.2 days
  • Top authors: wpwiredin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Multi Roles Vendor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.74 ▼9.67
Dashboard /wp-admin3.31 ▼0.0446.47 ▼14.73
Posts /wp-admin/edit.php3.36 ▲0.0045.11 ▼2.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.54 ▼4.67
Media Library /wp-admin/upload.php3.23 ▲0.0033.04 ▲2.40

Server storage [IO: ▲0.40MB] [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: 26 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Multi Roles Vendor: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.20 ▼0.141.64 ▼0.2435.61 ▼16.73
Dashboard /wp-admin2,195 ▲155.58 ▼0.0292.30 ▼5.7338.34 ▼8.36
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0440.83 ▲4.4235.69 ▲0.02
Add New Post /wp-admin/post-new.php1,528 ▲223.04 ▼0.46647.28 ▼36.5149.79 ▼11.02
Media Library /wp-admin/upload.php1,400 ▲64.17 ▼0.0495.07 ▼3.3839.85 ▼0.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/multi-roles-vendor/public/partials/multi-roles-vendor-public-display.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/multi-roles-vendor/admin/multi-roles-vendor-form-submit.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/multi-roles-vendor/admin/partials/multi-roles-vendor-admin-display.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multi-roles-vendor/multi_roles_vendor.php:14
    • > PHP Warning
      require_once(wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/multi-roles-vendor/admin/multi-roles-vendor-form-submit.php on line 2

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 uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

multi-roles-vendor/multi_roles_vendor.php 85% from 13 tests

The main file in "Multi Roles Vendor" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("multi-roles-vendor.php" instead of "multi_roles_vendor.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin323 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP14160557308
CSS42149
JavaScript24546

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.15
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected