83% miniorange-openid-connect-client

Code Review | WordPress OpenID Connect Client

WordPress plugin WordPress OpenID Connect Client scored 83% from 54 tests.

About plugin

  • Plugin page: miniorange-openid...
  • Plugin version: 2.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 5.8.1
  • First release: Mar 14, 2018
  • Latest release: Jan 28, 2022
  • Number of updates: 47
  • Update frequency: every 30.2 days
  • Top authors: cyberlord92 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 9,261 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 gracefully, with no errors

Server metrics [RAM: ▲0.73MB] [CPU: ▼145.30ms] Passed 4 tests

This is a short check of server-side resources used by WordPress OpenID Connect Client
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.8529.88 ▲10.29
Dashboard /wp-admin3.80 ▲0.7340.93 ▼1.58
Posts /wp-admin/edit.php3.85 ▲0.7437.59 ▲0.73
Add New Post /wp-admin/post-new.php6.16 ▲0.7277.32 ▼583.42
Media Library /wp-admin/upload.php3.74 ▲0.7427.45 ▲3.09

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 151 new files
Database: no new tables, 2 new options
New WordPress options
widget_mo_openidconnect_widget
host_name

Browser metrics Passed 4 tests

WordPress OpenID Connect Client: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,710 ▲8416.45 ▲0.834.91 ▼0.6176.54 ▲0.63
Dashboard /wp-admin2,971 ▲756.81 ▲0.67124.24 ▼10.44186.61 ▲16.83
Posts /wp-admin/edit.php2,743 ▲63.01 ▼0.2270.74 ▲8.17138.29 ▲3.50
Add New Post /wp-admin/post-new.php1,545 ▼2,15316.13 ▼2.16335.39 ▼88.34195.53 ▲29.79
Media Library /wp-admin/upload.php1,790 ▲416.08 ▲0.55127.04 ▼21.72201.20 ▲16.62

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 1 option in the database
    • widget_mo_openidconnect_widget

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 | 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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/miniorange-openid-connect-client/includes/manage-avatar.php:341
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/miniorange-openid-connect-client/class-mo-oauth-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/miniorange-openid-connect-client/class-mo-oauth-widget.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: The official readme.txt is a good inspiration

miniorange-openid-connect-client/mo_openidconnect_settings.php 92% from 13 tests

"WordPress OpenID Connect Client" version 2.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("miniorange-openid-connect-client.php" instead of "mo_openidconnect_settings.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin11,825 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP378032996,508
CSS12273524,104
SVG100685
JavaScript112751367
JSON100161

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 152)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.89
▷ Minimum class complexity1.00
▷ Maximum class complexity177.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity152.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods100
▷ Static methods3131.00%
▷ Public methods9393.00%
▷ Protected methods00.00%
▷ Private methods77.00%
Functions62
▷ Named functions6198.39%
▷ Anonymous functions11.61%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
83 compressed PNG files occupy 0.46MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/apps/images/whmcs.png2.36KB2.65KB0.00%
admin/partials/apps/images/meetup.png1.43KB1.52KB0.00%
admin/partials/apps/images/pinterest.png6.84KB6.71KB▼ 2.00%
admin/partials/apps/images/google.png11.84KB11.72KB▼ 1.00%
admin/partials/apps/images/shopify.png2.07KB2.15KB0.00%