84% loginradius-for-wordpress

Code Review | Authentication by LoginRadius

WordPress plugin Authentication by LoginRadius scored84%from 54 tests.

About plugin

  • Plugin page: loginradius-for-w...
  • Plugin version: 7.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Dec 2, 2011
  • Latest release: Oct 1, 2020
  • Number of updates: 173
  • Update frequency: every 18.8 days
  • Top authors: loginradius (88.44%)loginradius-dev (12.14%)

Code review

54 tests

User reviews

36 reviews

Install metrics

300+ active /365,562 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.24MB] [CPU: ▼6.83ms] Passed 4 tests

This is a short check of server-side resources used by Authentication by LoginRadius
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2537.07 ▼3.22
Dashboard /wp-admin3.55 ▲0.2044.06 ▼19.95
Posts /wp-admin/edit.php3.66 ▲0.3144.51 ▼1.69
Add New Post /wp-admin/post-new.php6.15 ▲0.2692.18 ▼2.46
Media Library /wp-admin/upload.php3.47 ▲0.2438.40 ▲4.77

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 200 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
ciam_api_settings
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
ciam_uninstall_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Authentication by LoginRadius
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.20 ▼1.384.20 ▲2.3839.07 ▼5.60
Dashboard /wp-admin2,225 ▲374.89 ▲0.02100.43 ▼17.1574.32 ▲26.46
Posts /wp-admin/edit.php2,111 ▲222.01 ▼0.0442.97 ▲0.0537.06 ▼0.67
Add New Post /wp-admin/post-new.php1,685 ▲14322.52 ▲4.24673.17 ▲42.6147.00 ▼12.31
Media Library /wp-admin/upload.php1,407 ▲224.21 ▼0.03107.04 ▲1.8246.96 ▲4.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LoginRadiusSDK\\Utility\\Functions' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/CustomerRegistration/Advanced/WebHookAPI.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'LoginRadiusSDK\\Clients\\IHttpClientInterface' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/WPHttpClient.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'LoginRadiusSDK\\Utility\\Functions' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/CustomerRegistration/Authentication/AuthenticationAPI.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LoginRadiusSDK\\Utility\\Functions' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/CustomerRegistration/Account/RoleAPI.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'LoginRadiusSDK\\Clients\\IHttpClientInterface' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/Clients/DefaultHttpClient.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'LoginRadiusSDK\\Utility\\Functions' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/CustomerRegistration/Authentication/PhoneAuthenticationAPI.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LoginRadiusSDK\\Utility\\Functions' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/CustomerRegistration/Advanced/ReAuthenticationAPI.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LoginRadiusSDK\\Utility\\Functions' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/CustomerRegistration/Advanced/MultiFactorAuthenticationAPI.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LoginRadiusSDK\\Utility\\Functions' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/CustomerRegistration/Advanced/ConfigurationAPI.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LoginRadiusSDK\\Utility\\Functions' not found in wp-content/plugins/loginradius-for-wordpress/authentication/lib/LoginRadiusSDK/CustomerRegistration/Authentication/RiskBasedAuthenticationAPI.php:15

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: hosted registration, user registration, cloud authentication, authentication, ciam

loginradius-for-wordpress/loginradius-for-wordpress.php Passed 13 tests

Analyzing the main PHP file in "Authentication by LoginRadius" version 7.3.0
51 characters long description:
LoginRadius Customer Identity and Access Management

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
There were no executable files found in this plugin9,995 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP471,7272,4886,296
CSS5163793,072
JavaScript55430627

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.44
Average class complexity27.50
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods366
▷ Static methods205.46%
▷ Public methods35998.09%
▷ Protected methods00.00%
▷ Private methods71.91%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants32
▷ Global constants2887.50%
▷ Class constants412.50%
▷ Public constants4100.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
135 PNG files occupy 0.39MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
authentication/assets/images/mapping/RAAS.png0.13KB0.11KB▼ 14.39%
authentication/assets/images/default_interface/foursquare.png2.36KB1.10KB▼ 53.28%
authentication/assets/images/mapping/virgilio.png3.11KB0.44KB▼ 85.71%
authentication/assets/images/default_interface/stackexchange.png2.31KB1.03KB▼ 55.48%
authentication/assets/images/default_interface/vkon.png2.46KB1.12KB▼ 54.48%