78% user-access-manager

Code Review | User Access Manager

WordPress plugin User Access Manager scored78%from 54 tests.

About plugin

  • Plugin page: user-access-manager
  • Plugin version: 2.2.23
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 17, 2008
  • Latest release: Sep 21, 2023
  • Number of updates: 468
  • Update frequency: every 11.5 days
  • Top authors: GM_Alex (100%)

Code review

54 tests

User reviews

113 reviews

Install metrics

20,000+ active /1,204,597 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
Install script ran successfully

Server metrics [RAM: ▲1.91MB] [CPU: ▲9.52ms] Passed 4 tests

Analyzing server-side resources used by User Access Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.16 ▲1.7060.78 ▲23.07
Dashboard /wp-admin5.27 ▲1.9759.94 ▲11.08
Posts /wp-admin/edit.php5.49 ▲2.1365.08 ▲14.90
Add New Post /wp-admin/post-new.php7.97 ▲2.0899.11 ▼4.59
Media Library /wp-admin/upload.php5.11 ▲1.8848.87 ▲16.67
About /wp-admin/admin.php?page=uam_about5.04335.74
Settings /wp-admin/admin.php?page=uam_settings5.1746.06
Manage user groups /wp-admin/admin.php?page=uam_user_group5.2746.42
Setup /wp-admin/admin.php?page=uam_setup5.0648.83

Server storage [IO: ▲0.94MB] [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: 168 new files
Database: 2 new tables, 8 new options
New tables
wp_uam_accessgroup_to_object
wp_uam_accessgroups
New WordPress options
widget_uam_login_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
uam_db_version
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for User Access Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.71 ▲0.151.82 ▲0.1043.81 ▲0.72
Dashboard /wp-admin2,237 ▲635.60 ▲0.0387.48 ▲2.3234.96 ▼9.45
Posts /wp-admin/edit.php2,381 ▲2812.05 ▲0.0836.19 ▼0.9135.66 ▲2.84
Add New Post /wp-admin/post-new.php6,392 ▲4,86625.86 ▲2.36905.85 ▲216.0544.25 ▼17.27
Media Library /wp-admin/upload.php1,445 ▲454.25 ▲0.0598.88 ▲4.7441.43 ▼1.34
About /wp-admin/admin.php?page=uam_about1,0512.2222.9630.48
Settings /wp-admin/admin.php?page=uam_settings1,1552.1226.6627.02
Manage user groups /wp-admin/admin.php?page=uam_user_group1,1322.0424.3827.67
Setup /wp-admin/admin.php?page=uam_setup9202.0424.2429.37

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_uam_login_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/user-access-manager/src/View/InfoBox.php
    • > /wp-content/plugins/user-access-manager/src/View/SteadyBanner.php
  • 122× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'UserAccessManager\\File\\FileProtection' not found in wp-content/plugins/user-access-manager/src/File/ApacheFileProtection.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'UserAccessManager\\Form\\ValueSetFormElement' not found in wp-content/plugins/user-access-manager/src/Form/MultipleFormElement.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'UserAccessManager\\Controller\\Backend\\ObjectController' not found in wp-content/plugins/user-access-manager/src/Controller/Backend/DynamicGroupsController.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'UserAccessManager\\Setup\\Update\\UpdateInterface' not found in wp-content/plugins/user-access-manager/src/Setup/Database/DatabaseUpdate.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'UserAccessManager\\Setup\\Database\\DatabaseUpdate' not found in wp-content/plugins/user-access-manager/src/Setup/Update/DatabaseUpdate6.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'UserAccessManager\\Form\\FormElement' not found in wp-content/plugins/user-access-manager/src/Form/Textarea.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'UserAccessManager\\Form\\MultipleFormElement' not found in wp-content/plugins/user-access-manager/src/Form/Radio.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'UserAccessManager\\Controller\\Controller' not found in wp-content/plugins/user-access-manager/src/Controller/Backend/SettingsController.php:36
    • > PHP Notice
      Undefined variable: controller in wp-content/plugins/user-access-manager/src/View/Login/LoginForm.php on line 19
    • > PHP Warning
      Use of undefined constant TXT_UAM_DONATE_HEAD - assumed 'TXT_UAM_DONATE_HEAD' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-access-manager/src/View/AdminAbout.php on line 35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
You can look at the official readme.txt

user-access-manager/user-access-manager.php Passed 13 tests

The main PHP file in "User Access Manager" ver. 2.2.23 adds more information about the plugin and also serves as the entry point for this plugin
61 characters long description:
Manage the access to your posts, pages, categories and files.

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 detected15,078 lines of code in 161 files:
LanguageFilesBlank linesComment linesLines of code
PHP1512,7378,27212,068
JSON4002,450
JavaScript3877392
CSS24710164
Markdown1104

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.92
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces23
Interfaces4
Traits6
Classes105
▷ Abstract classes1110.48%
▷ Concrete classes9489.52%
▷ Final classes00.00%
Methods890
▷ Static methods192.13%
▷ Public methods71880.67%
▷ Protected methods444.94%
▷ Private methods12814.38%
Functions31
▷ Named functions26.45%
▷ Anonymous functions2993.55%
Constants363
▷ Global constants27475.48%
▷ Class constants8924.52%
▷ Public constants89100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/gfx/icon.png2.35KB1.34KB▼ 42.87%
assets/gfx/noAccessPic.png6.45KB4.43KB▼ 31.37%