84% web-administrator-user-role

Code Review | Web Administrator User Role

WordPress plugin Web Administrator User Role scored84%from 54 tests.

About plugin

  • Plugin page: web-administrator...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2017
  • Latest release: Mar 19, 2018
  • Number of updates: 11
  • Update frequency: every 33.1 days
  • Top authors: ironleg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /850 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼12.26ms] Passed 4 tests

Analyzing server-side resources used by Web Administrator User Role
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.11 ▲2.43
Dashboard /wp-admin3.38 ▲0.0350.74 ▼13.98
Posts /wp-admin/edit.php3.43 ▲0.0746.82 ▼3.53
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.58 ▼20.95
Media Library /wp-admin/upload.php3.30 ▲0.0738.37 ▼10.59
Web Administrator /wp-admin/options-general.php?page=web-administrator-options3.2734.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Web Administrator User Role
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3514.78 ▲0.471.75 ▼0.3440.09 ▼4.78
Dashboard /wp-admin2,215 ▲274.86 ▼1.02101.39 ▼2.2141.55 ▼2.75
Posts /wp-admin/edit.php2,098 ▲92.04 ▲0.0334.72 ▼0.5932.35 ▼1.92
Add New Post /wp-admin/post-new.php1,542 ▲1418.47 ▲0.24639.83 ▼21.4758.50 ▼4.94
Media Library /wp-admin/upload.php1,394 ▲94.20 ▼0.0198.86 ▼8.6444.97 ▼1.27
Web Administrator /wp-admin/options-general.php?page=web-administrator-options1,0702.0623.2728.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/web-administrator-user-role/web-administrator-user-role.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: change capabilities, user role, user role plugin, capability, administrator

web-administrator-user-role/web-administrator-user-role.php Passed 13 tests

The main PHP file in "Web Administrator User Role" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
113 characters long description:
Plugin that automatically creates custom role for Web Administrators and allows to edit capacities for this role.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin251 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12922235
CSS10016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin