83% role-based-help-notes

Code Review | Role Based Help Notes

WordPress plugin Role Based Help Notes scored83%from 54 tests.

About plugin

  • Plugin page: role-based-help-n...
  • Plugin version: 2.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Jul 6, 2023
  • Number of updates: 303
  • Update frequency: every 11.8 days
  • Top authors: JustinTicktock (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

20+ active /9,705 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.91MB] [CPU: ▲4.29ms] Passed 4 tests

Analyzing server-side resources used by Role Based Help Notes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.35 ▲0.8946.20 ▼6.40
Dashboard /wp-admin4.23 ▲0.9257.50 ▲6.98
Posts /wp-admin/edit.php4.28 ▲0.9261.05 ▲12.56
Add New Post /wp-admin/post-new.php6.81 ▲0.92106.26 ▲4.00
Media Library /wp-admin/upload.php4.15 ▲0.9253.23 ▲20.56
Help Notes /wp-admin/options-general.php?page=notes-settings4.1344.58

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 13 new options
New WordPress options
rbhn_welcome_page
widget_rbhn_tag_cloud_widget
widget_theysaidso_widget
rbhn_caps_created
rbhn_plugin_version
widget_recent-posts
widget_rbhn_contents_page_navigation_widget
can_compress_scripts
theysaidso_admin_options
rbhn_install_date
...

Browser metrics Passed 4 tests

Role Based Help Notes: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.72 ▼0.491.91 ▼3.5339.60 ▼4.75
Dashboard /wp-admin2,215 ▲304.88 ▼0.97103.21 ▼7.2239.38 ▼4.18
Posts /wp-admin/edit.php2,098 ▲62.16 ▲0.1541.56 ▲1.2834.58 ▼2.94
Add New Post /wp-admin/post-new.php1,545 ▲3118.47 ▲1.08610.33 ▼54.3957.63 ▼0.14
Media Library /wp-admin/upload.php1,391 ▼04.24 ▲0.0895.17 ▼5.4442.02 ▼2.84
Help Notes /wp-admin/options-general.php?page=notes-settings8941.9824.4628.67

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/role-based-help-notes/includes/class-rbhn-pointers.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'RBHN_Role_Based_Help_Notes' not found in wp-content/plugins/role-based-help-notes/includes/plugin-compatibility/email-users/email-users-custom.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/role-based-help-notes/includes/plugin-compatibility/buddypress/buddypress.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/role-based-help-notes/includes/class-tgm-plugin-activation.php:2130
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/role-based-help-notes/includes/plugin-compatibility/tabby-responsive-tabs/tabby-responsive-tabs.php:17

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === role-based-help-notes === )
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

role-based-help-notes/role-based-help-notes.php 92% from 13 tests

This is the main PHP file of "Role Based Help Notes" version 2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected4,462 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP211,4192,7514,400
JavaScript322262

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity29.74
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods209
▷ Static methods146.70%
▷ Public methods18186.60%
▷ Protected methods2311.00%
▷ Private methods52.39%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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