78% advanced-access-manager

Code Review | Advanced Access Manager - Restricted Content, Users & Roles, Enhanced Security and More

WordPress plugin Advanced Access Manager - Restricted Content, Users & Roles, Enhanced Security and More scored78%from 54 tests.

About plugin

  • Plugin page: advanced-access-m...
  • Plugin version: 6.9.18
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2011
  • Latest release: Nov 12, 2023
  • Number of updates: 708
  • Update frequency: every 6.3 days
  • Top authors: vasyl_m (75%)vasyltech (25%)

Code review

54 tests

User reviews

413 reviews

Install metrics

100,000+ active /5,036,423 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: ▲2.18MB] [CPU: ▲16.28ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Access Manager - Restricted Content, Users & Roles, Enhanced Security and More
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.51 ▲2.0558.06 ▲16.84
Dashboard /wp-admin5.56 ▲2.2563.05 ▲10.97
Posts /wp-admin/edit.php5.61 ▲2.2465.64 ▲22.04
Add New Post /wp-admin/post-new.php8.40 ▲2.51115.11 ▲15.97
Media Library /wp-admin/upload.php5.40 ▲2.1654.91 ▲21.33

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 258 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_aam_backend_login
widget_recent-posts
widget_theysaidso_widget
aam_migrations
theysaidso_admin_options

Browser metrics Passed 4 tests

Advanced Access Manager - Restricted Content, Users & Roles, Enhanced Security and More: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲12414.73 ▲0.361.93 ▲0.0137.83 ▼7.22
Dashboard /wp-admin2,276 ▲965.51 ▼0.1487.96 ▼3.9738.56 ▼3.95
Posts /wp-admin/edit.php2,178 ▲961.98 ▼0.0439.52 ▲2.7934.73 ▲1.39
Add New Post /wp-admin/post-new.php1,542 ▲622.94 ▼0.25625.85 ▼57.1152.57 ▲1.05
Media Library /wp-admin/upload.php1,478 ▲814.19 ▼0.0699.01 ▼1.1243.04 ▼2.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • widget_aam_backend_login
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • aam_migrations
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 49× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/partial/jwt-login-url.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/settings/content.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/partial/taxonomy-access-form.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/service/route.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/settings/service.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/partial/role-inheritance.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/service/menu.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/service/welcome.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/metabox/iframe-header.php
    • > /wp-content/plugins/advanced-access-manager/application/Backend/tmpl/widget/login-backend.php
  • 111× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AAM_Backend_Feature_Abstract' not found in wp-content/plugins/advanced-access-manager/application/Backend/Feature/Main/Toolbar.php:19
    • > PHP Fatal error
      Trait 'AAM_Core_Contract_SingletonTrait' not found in wp-content/plugins/advanced-access-manager/application/Service/Core.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'AAM_Backend_Feature_Abstract' not found in wp-content/plugins/advanced-access-manager/application/Backend/Feature/Main/Jwt.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'AAM_Core_Subject' not found in wp-content/plugins/advanced-access-manager/application/Core/Subject/Role.php:19
    • > PHP Fatal error
      Trait 'AAM_Core_Contract_RequestTrait' not found in wp-content/plugins/advanced-access-manager/application/Backend/Feature/Abstract.php on line 19
    • > PHP Fatal error
      Trait 'AAM_Core_Contract_SingletonTrait' not found in wp-content/plugins/advanced-access-manager/application/Core/Restful.php on line 16
    • > PHP Fatal error
      Trait 'AAM_Core_Contract_ServiceTrait' not found in wp-content/plugins/advanced-access-manager/application/Service/LogoutRedirect.php on line 23
    • > PHP Fatal error
      Trait 'AAM_Core_Contract_ServiceTrait' not found in wp-content/plugins/advanced-access-manager/application/Service/NotFoundRedirect.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'AAM_Core_Object' not found in wp-content/plugins/advanced-access-manager/application/Core/Object/Visibility.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'AAM_Framework_Service_RedirectAbstract' not found in wp-content/plugins/advanced-access-manager/application/Framework/Service/LoginRedirect.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: membership, access control, user role, backend menu, jwt...

advanced-access-manager/aam.php 92% from 13 tests

The entry point to "Advanced Access Manager - Restricted Content, Users & Roles, Enhanced Security and More" version 6.9.18 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-access-manager.php" instead of "aam.php")

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
No dangerous file extensions were detected28,157 lines of code in 235 files:
LanguageFilesBlank linesComment linesLines of code
PHP2264,54217,46319,769
JavaScript46817864,643
CSS2296822,109
PO File16059531,534
SVG2651102

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.21
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces8
Interfaces13
Traits5
Classes148
▷ Abstract classes53.38%
▷ Concrete classes14396.62%
▷ Final classes64.20%
Methods1,111
▷ Static methods17916.11%
▷ Public methods73666.25%
▷ Protected methods25522.95%
▷ Private methods12010.80%
Functions185
▷ Named functions00.00%
▷ Anonymous functions185100.00%
Constants168
▷ Global constants42.38%
▷ Class constants16497.62%
▷ Public constants164100.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
13 compressed PNG files occupy 0.68MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/material/json-policy.png55.73KB55.79KB0.00%
media/material/private-wordpress-website.png46.25KB46.30KB0.00%
media/material/passwordless-login-temp-accounts.png58.80KB58.88KB0.00%
media/material/manage-roles-users-capabilities.png59.00KB59.11KB0.00%
media/material/3-simple-steps-for-website-security.png61.47KB61.54KB0.00%