90% custom-access-roles

Code Review | Custom Access Roles

WordPress plugin Custom Access Roles scored90%from 54 tests.

About plugin

  • Plugin page: custom-access-roles
  • Plugin version: 2.1.2.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 4, 2016
  • Latest release: Oct 25, 2023
  • Number of updates: 27
  • Update frequency: every 97.7 days
  • Top authors: room34 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,769 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.43ms] Passed 4 tests

This is a short check of server-side resources used by Custom Access Roles
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0833.94 ▼7.27
Dashboard /wp-admin3.38 ▲0.0847.43 ▼2.22
Posts /wp-admin/edit.php3.50 ▲0.1449.73 ▲9.05
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.05 ▼19.49
Media Library /wp-admin/upload.php3.31 ▲0.0837.95 ▲3.28
Custom Access Roles /wp-admin/users.php?page=caroles3.4134.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Access Roles
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.14 ▼0.211.65 ▲0.0036.22 ▼6.95
Dashboard /wp-admin2,206 ▲295.65 ▼0.0288.13 ▼6.8237.08 ▼5.75
Posts /wp-admin/edit.php2,111 ▲111.99 ▼0.0335.60 ▼3.1331.65 ▼1.78
Add New Post /wp-admin/post-new.php1,533 ▲723.33 ▼0.11646.06 ▲56.0963.29 ▲15.88
Media Library /wp-admin/upload.php1,411 ▲144.16 ▼0.03109.36 ▼1.7247.57 ▼2.94
Custom Access Roles /wp-admin/users.php?page=caroles9222.0124.3425.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: capabilities, editing, roles, permissions, access control

custom-access-roles/custom-access-roles.php 92% from 13 tests

"Custom Access Roles" version 2.1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected779 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2180325699
CSS114060
JavaScript17319
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity67.00
▷ Minimum class complexity67.00
▷ Maximum class complexity67.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin