84% user-rights-access-manager

Code Review | User Rights Access Manager

WordPress plugin User Rights Access Manager scored 84% from 54 tests.

About plugin

  • Plugin page: user-rights-acces...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2020
  • Latest release: Mar 20, 2023
  • Number of updates: 22
  • Update frequency: every 52.4 days
  • Top authors: prismitsystems (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active / 10,336 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▲0.07ms] Passed 4 tests

A check of server-side resources used by User Rights Access Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.24 ▼0.59
Dashboard /wp-admin3.55 ▲0.2449.63 ▲3.62
Posts /wp-admin/edit.php3.65 ▲0.3046.98 ▼0.27
Add New Post /wp-admin/post-new.php6.16 ▲0.2786.81 ▼2.47
Media Library /wp-admin/upload.php3.47 ▲0.2437.69 ▲4.58

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
wp_meta_boxes_data

Browser metrics Passed 4 tests

Checking browser requirements for User Rights Access Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10913.67 ▼0.631.64 ▼0.5248.22 ▼1.07
Dashboard /wp-admin2,269 ▲845.21 ▼0.67111.20 ▲10.5240.38 ▼2.06
Posts /wp-admin/edit.php2,119 ▲332.26 ▲0.2235.08 ▼1.5231.05 ▼0.56
Add New Post /wp-admin/post-new.php1,538 ▲2423.50 ▲1.69664.64 ▼48.1151.91 ▼6.39
Media Library /wp-admin/upload.php1,418 ▲364.34 ▲0.1899.25 ▲1.8041.60 ▼2.85

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • wp_meta_boxes_data
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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 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
Almost there! Just fix the following items
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Roles' not found in wp-content/plugins/user-rights-access-manager/class/uram_user_role_create.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-rights-access-manager/metabox/metaboxes_restriction.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-rights-access-manager/admin/admin_menu_handle.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/user-rights-access-manager/template/res_wp_role_list_wpl_list.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_PageDropdown' not found in wp-content/plugins/user-rights-access-manager/class/uram_walker_pagedropdown_multiple.php:10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-rights-access-manager/template/res_wp_list_table.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-rights-access-manager/metabox/admin_toolbar_handle.php:21
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/user-rights-access-manager/template/res_wp_list_table.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_names() on null in wp-content/plugins/user-rights-access-manager/admin/user_list_admin.php:27
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/user-rights-access-manager/template/res_wp_role_list_wpl_list.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: restrict user roles, user restriction, user access rights

user-rights-access-manager/user-rights-access-manager.php 92% from 13 tests

This is the main PHP file of "User Rights Access Manager" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 160 characters long)

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
Good job! No executable or dangerous file extensions detected2,696 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP182372871,814
CSS27513607
JavaScript23013152
PO File14660108
SVG20215

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity24.36
▷ Minimum class complexity3.00
▷ Maximum class complexity56.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods70
▷ Static methods00.00%
▷ Public methods5882.86%
▷ Protected methods811.43%
▷ Private methods45.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
No PNG images were found in this plugin