83% auth0

Code Review | Login by Auth0

WordPress plugin Login by Auth0 scored83%from 54 tests.

About plugin

  • Plugin page: auth0
  • Plugin version: 4.5.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2014
  • Latest release: Jan 30, 2023
  • Number of updates: 186
  • Update frequency: every 17.0 days
  • Top authors: auth0 (97.31%)rrauch (3.23%)

Code review

54 tests

User reviews

15 reviews

Install metrics

5,000+ active /180,741 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.79MB] [CPU: ▼2.39ms] Passed 4 tests

A check of server-side resources used by Login by Auth0
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6050.04 ▲6.95
Dashboard /wp-admin4.17 ▲0.8259.24 ▼13.11
Posts /wp-admin/edit.php4.29 ▲0.9360.64 ▲9.45
Add New Post /wp-admin/post-new.php6.77 ▲0.8894.82 ▼10.34
Media Library /wp-admin/upload.php4.09 ▲0.8647.48 ▲6.95
Error Log /wp-admin/admin.php?page=wpa0-errors4.0642.09
Setup Wizard /wp-admin/admin.php?page=wpa0-setup4.0839.99
Import-Export settings /wp-admin/admin.php?page=wpa0-import-settings4.0742.31
Settings /wp-admin/admin.php?page=wpa04.1048.99

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 201 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
wp_auth0_settings
widget_wp_auth0_popup_widget
can_compress_scripts
widget_wp_auth0_widget
auth0_db_version
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Login by Auth0
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲5114.25 ▼0.021.69 ▼0.6244.50 ▲2.73
Dashboard /wp-admin2,213 ▲365.56 ▲0.0285.17 ▼10.5968.15 ▲24.60
Posts /wp-admin/edit.php2,109 ▲92.03 ▼0.1235.73 ▼5.1335.91 ▼1.20
Add New Post /wp-admin/post-new.php1,551 ▲1523.46 ▲0.07703.41 ▲12.7365.92 ▲5.93
Media Library /wp-admin/upload.php1,430 ▲334.16 ▼0.1098.26 ▼8.7673.72 ▲29.71
Error Log /wp-admin/admin.php?page=wpa0-errors8621.6526.0629.40
Setup Wizard /wp-admin/admin.php?page=wpa0-setup9581.8230.1434.79
Import-Export settings /wp-admin/admin.php?page=wpa0-import-settings8991.8125.6436.48
Settings /wp-admin/admin.php?page=wpa01,7543.2345.4778.71

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 80× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/auth0/vendor/auth0/php-jwt/test/unit/Signer/KeyTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/auth0/vendor/auth0/php-jwt/test/unit/Signer/RsaTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Hmac' not found in wp-content/plugins/auth0/vendor/auth0/php-jwt/src/Signer/Hmac/Sha512.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Auth0_Nonce_Handler' not found in wp-content/plugins/auth0/lib/WP_Auth0_State_Handler.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/auth0/templates/initial-setup/connection_profile.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/auth0/vendor/auth0/php-jwt/test/unit/Claim/GreaterOrEqualsToTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/auth0/vendor/auth0/php-jwt/test/functional/UnsignedTokenTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Rsa' not found in wp-content/plugins/auth0/vendor/auth0/php-jwt/src/Signer/Rsa/Sha512.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/auth0/vendor/auth0/php-jwt/test/unit/Signer/Ecdsa/MultibyteStringConverterTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/auth0/vendor/auth0/php-jwt/test/unit/Signer/Hmac/Sha384Test.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

auth0/WP_Auth0.php 77% from 13 tests

The entry point to "Login by Auth0" version 4.5.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 159 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("auth0.php" instead of "WP_Auth0.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected12,803 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1442,3877,0169,271
PO File26667141,970
Stylus21402685
JavaScript963105333
Markdown1590135
CSS370115
JSON200114
SVG70572
YAML23068
XML11026
LESS13014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.94
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces10
Interfaces4
Traits1
Classes120
▷ Abstract classes75.83%
▷ Concrete classes11394.17%
▷ Final classes97.96%
Methods722
▷ Static methods638.73%
▷ Public methods59882.83%
▷ Protected methods7810.80%
▷ Private methods466.37%
Functions67
▷ Named functions6292.54%
▷ Anonymous functions57.46%
Constants65
▷ Global constants1726.15%
▷ Class constants4873.85%
▷ Public constants48100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/initial-setup/enterprise-connections/windows.png0.84KB0.86KB0.00%
assets/img/initial-setup/enterprise-connections/google.png2.38KB2.41KB0.00%
assets/img/initial-setup/enterprise-connections/sharepoint.png1.53KB1.54KB0.00%
assets/img/initial-setup/enterprise-connections/ip-address.png0.81KB0.84KB0.00%
assets/img/initial-setup/enterprise-connections/ws-fed.png0.61KB0.63KB0.00%