84% oauth-client-for-user-authentication

Code Review | OAuth client Single Sign On for WordPress ( OAuth 2.0 SSO )

WordPress plugin OAuth client Single Sign On for WordPress ( OAuth 2.0 SSO ) scored84%from 54 tests.

About plugin

  • Plugin page: oauth-client-for-...
  • Plugin version: 3.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2020
  • Latest release: Feb 21, 2023
  • Number of updates: 22
  • Update frequency: every 35.6 days
  • Top authors: mysteve06 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /9,136 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼7.70ms] Passed 4 tests

Analyzing server-side resources used by OAuth client Single Sign On for WordPress ( OAuth 2.0 SSO )
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1843.32 ▲2.60
Dashboard /wp-admin3.49 ▲0.1850.56 ▼9.68
Posts /wp-admin/edit.php3.60 ▲0.2450.72 ▼1.31
Add New Post /wp-admin/post-new.php6.07 ▲0.1886.23 ▼22.42
Media Library /wp-admin/upload.php3.41 ▲0.1840.58 ▲5.07

Server storage [IO: ▲0.11MB] [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: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for OAuth client Single Sign On for WordPress ( OAuth 2.0 SSO )
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12214.17 ▼0.181.70 ▼0.0446.90 ▲0.57
Dashboard /wp-admin2,281 ▲1015.63 ▼0.0390.61 ▼9.7655.86 ▲9.11
Posts /wp-admin/edit.php2,189 ▲861.97 ▲0.0139.49 ▲0.4836.39 ▼0.81
Add New Post /wp-admin/post-new.php1,612 ▲7923.21 ▲0.00642.43 ▼32.5653.26 ▼5.08
Media Library /wp-admin/upload.php1,486 ▲834.19 ▼0.0399.68 ▼5.5844.46 ▼2.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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

SRP 50% 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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/oauth-client-for-user-authentication/oauthclient_controller.php on line 16
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/oauth-client-for-user-authentication/oauthclient_controller.php on line 16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/oauth-client-for-user-authentication/oauthclient_controller.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (OAuth Configuration.), #2 (Attributes Mapping for WP users.)
Please take inspiration from this readme.txt

oauth-client-for-user-authentication/oauthclient_controller.php 92% from 13 tests

This is the main PHP file of "OAuth client Single Sign On for WordPress ( OAuth 2.0 SSO )" version 3.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("oauth-client-for-user-authentication.php" instead of "oauthclient_controller.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,307 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP8337381,412
JavaScript41581495
CSS17212400

PHP code Passed 2 tests

This is a very shot review of 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.44
Average class complexity32.33
▷ Minimum class complexity4.00
▷ Maximum class complexity79.00
Average method complexity4.92
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1041.67%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin