93% admin-users-advances-permissions

Code Review | Admin users advanced permissions

WordPress plugin Admin users advanced permissions scored 93% from 54 tests.

About plugin

  • Plugin page: admin-users-advan...
  • Plugin version: 1.03
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.9.2
  • First release: Nov 14, 2014
  • Latest release: Nov 19, 2014
  • Number of updates: 12
  • Update frequency: every 0.4 days
  • Top authors: mr_mat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,455 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Admin users advanced permissions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0452.54 ▲3.30
Dashboard /wp-admin3.45 ▲0.0434.07 ▼0.38
Posts /wp-admin/edit.php3.67 ▲0.0338.61 ▲2.47
Add New Post /wp-admin/post-new.php6.91 ▼0.0695.67 ▼1,182.46
Media Library /wp-admin/upload.php3.32 ▲0.0326.09 ▲0.82

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Admin users advanced permissions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4115.82 ▼0.135.90 ▼0.302.45 ▼0.34
Dashboard /wp-admin2,895 ▲406.13 ▼0.07120.11 ▼11.77156.71 ▼2.95
Posts /wp-admin/edit.php2,691 ▲63.23 ▼0.0164.90 ▲1.87158.69 ▲8.04
Add New Post /wp-admin/post-new.php1,711 ▲5020.85 ▲4.23453.04 ▼7.90202.71 ▲49.86
Media Library /wp-admin/upload.php1,698 ▼05.54 ▼0.00137.79 ▼7.75186.43 ▲2.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-users-advances-permissions/inc/admin-users.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/admin-users-advances-permissions/admin-users-advanced-permissions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/admin-users-advances-permissions/inc/admin-restrict-cat-tax.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found


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:
  • Screenshots: Add an image for screenshot #1 (Setting permission on new user form or user edit form)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === admin-users-advances-permissions === )
You can take inspiration from this readme.txt

admin-users-advances-permissions/admin-users-advanced-permissions.php 92% from 13 tests

"Admin users advanced permissions" version 1.03's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("admin-users-advances-permissions.php" instead of "admin-users-advanced-permissions.php")

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
No dangerous file extensions were detected179 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File13522

PHP code Passed 2 tests

An overview 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.50
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png24.06KB10.68KB▼ 55.61%