89% role-based-hide-adminbar

Code Review | Role Based Hide Adminbar

WordPress plugin Role Based Hide Adminbar scored89%from 54 tests.

About plugin

  • Plugin page: role-based-hide-a...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 27, 2018
  • Latest release: Jul 11, 2023
  • Number of updates: 13
  • Update frequency: every 139.2 days
  • Top authors: yasirkhalifa (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /992 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Role Based Hide Adminbar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.98 ▲4.27
Dashboard /wp-admin3.33 ▼0.0242.33 ▼16.34
Posts /wp-admin/edit.php3.38 ▲0.0244.79 ▼5.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.06 ▼8.54
Media Library /wp-admin/upload.php3.25 ▲0.0236.36 ▲4.68
Hide Adminbar /wp-admin/options-general.php?page=rbhabar-setting3.2228.91

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
rbhabar_options_name

Browser metrics Passed 4 tests

A check of browser resources used by Role Based Hide Adminbar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.121.63 ▲0.0344.38 ▲5.54
Dashboard /wp-admin2,202 ▲335.66 ▲0.0283.18 ▼13.5039.24 ▼9.42
Posts /wp-admin/edit.php2,104 ▲11.95 ▼0.0633.27 ▼7.8232.60 ▼1.81
Add New Post /wp-admin/post-new.php1,529 ▼223.39 ▲0.40673.75 ▲13.4555.42 ▲0.84
Media Library /wp-admin/upload.php1,395 ▼54.15 ▼0.0497.57 ▼7.3445.45 ▼2.55
Hide Adminbar /wp-admin/options-general.php?page=rbhabar-setting8342.0024.4933.21

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
  • Screenshots: Screenshot #1 (Admin page setting and layout) image not found
Please take inspiration from this readme.txt

role-based-hide-adminbar/role-based-hide-adminbar.php 92% from 13 tests

Analyzing the main PHP file in "Role Based Hide Adminbar" version 1.0.6
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin112 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP201163
CSS17549

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin