83% wp-sitebuilder-role-manager

Code Review | WP Sitebuilder - Role Manager

WordPress plugin WP Sitebuilder - Role Manager scored83%from 54 tests.

About plugin

  • Plugin page: wp-sitebuilder-ro...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2016
  • Latest release: Nov 2, 2016
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,270 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by WP Sitebuilder - Role Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.06 ▼5.51
Dashboard /wp-admin3.31 ▲0.0150.93 ▲0.19
Posts /wp-admin/edit.php3.36 ▲0.0146.35 ▲0.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.92 ▼9.10
Media Library /wp-admin/upload.php3.24 ▲0.0136.66 ▲0.76

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Sitebuilder - Role Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲8214.48 ▼0.271.77 ▼0.3436.79 ▼10.76
Dashboard /wp-admin2,219 ▲284.86 ▼1.23102.92 ▼14.3540.25 ▼6.63
Posts /wp-admin/edit.php2,108 ▲192.01 ▲0.0136.43 ▲1.4435.26 ▼1.89
Add New Post /wp-admin/post-new.php1,376 ▼13817.22 ▼0.37575.32 ▼115.6943.05 ▼13.00
Media Library /wp-admin/upload.php1,401 ▲164.20 ▲0.0195.04 ▼5.0342.84 ▼0.69

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include_once(): Failed opening 'WPSB_ROOT/components/element-components.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-sitebuilder-role-manager/admin/role-manager-panel.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sitebuilder-role-manager/admin/role-manager-panel.php:9
    • > PHP Warning
      Use of undefined constant WPSB_ROOT - assumed 'WPSB_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-sitebuilder-role-manager/admin/role-manager-panel.php on line 1
    • > PHP Warning
      include_once(WPSB_ROOT/components/element-components.php): failed to open stream: No such file or directory in wp-content/plugins/wp-sitebuilder-role-manager/admin/role-manager-panel.php on line 1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 29 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-sitebuilder-role-manager/wpsb-role-manager.php 85% from 13 tests

The main PHP file in "WP Sitebuilder - Role Manager" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-sitebuilder-role-manager.php" instead of "wpsb-role-manager.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin261 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32831218
Markdown120036
LESS1006
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin