74% umich-oidc-login

Code Review | UMich OIDC Login

WordPress plugin UMich OIDC Login scored74%from 54 tests.

About plugin

  • Plugin page: umich-oidc-login
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Sep 12, 2023
  • Number of updates: 22
  • Update frequency: every 14.5 days
  • Top authors: umichitswebhosting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,029 total downloads

Benchmarks

Plugin footprint 65% 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.61MB] [CPU: ▲5.43ms] Passed 4 tests

An overview of server-side resources used by UMich OIDC Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6350.90 ▲9.08
Dashboard /wp-admin3.91 ▲0.6050.63 ▲2.27
Posts /wp-admin/edit.php3.96 ▲0.6052.52 ▲2.29
Add New Post /wp-admin/post-new.php6.64 ▲0.76126.01 ▲15.70
Media Library /wp-admin/upload.php3.83 ▲0.6040.45 ▲8.09
UMich OIDC Login /wp-admin/options-general.php?page=umich_oidc-settings3.9941.78

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 415 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
umich_oidc_internals
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
umich_oidc_settings

Browser metrics Passed 4 tests

An overview of browser requirements for UMich OIDC Login
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.24 ▼1.312.06 ▲0.2142.79 ▼1.39
Dashboard /wp-admin2,212 ▲214.87 ▼0.06115.22 ▲13.9042.47 ▼1.43
Posts /wp-admin/edit.php2,095 ▲61.99 ▼0.0640.09 ▼2.2634.30 ▼0.35
Add New Post /wp-admin/post-new.php6,256 ▲4,71721.96 ▼1.46949.86 ▲351.7866.59 ▲6.16
Media Library /wp-admin/upload.php1,394 ▲154.15 ▼0.0795.76 ▼4.0840.14 ▼2.23
UMich OIDC Login /wp-admin/options-general.php?page=umich_oidc-settings1,3759.30225.7653.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstaller has failed for this plugin, leaving 415 files (3.61MB) in the plugin directory
    • (new file) LICENSE.txt
    • (new file) build/vendor/composer/InstalledVersions.php
    • (new file) build/vendor/composer/ClassLoader.php
    • (new file) build/composer.json
    • (new file) build/metabox/index.js
    • (new file) README.txt
    • (new file) build/metabox/index.asset.php
    • (new file) COPYRIGHT.txt
    • (new file) assets/js/settings.js
    • (new file) build/vendor/autoload.php
    • ...
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • umich_oidc_internals
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • umich_oidc_settings
    • widget_theysaidso_widget
    • db_upgraded

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 176× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Crypt\\DSA' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Parameters.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Math\\Common\\FiniteField' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Math/BinaryField.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Crypt\\EC\\BaseCurves\\Binary' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect283r1.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Crypt\\Common\\Formats\\Keys\\PKCS8' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Crypt\\EC\\BaseCurves\\Binary' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect239k1.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Crypt\\EC\\Curves\\sect233r1' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistb233.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Math\\BigInteger\\Engines\\OpenSSL' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/OpenSSL.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Crypt\\EC\\Curves\\secp192r1' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime192v1.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'UMich_OIDC\\Vendor\\phpseclib3\\Math\\BigInteger\\Engines\\PHP' not found in wp-content/plugins/umich-oidc-login/build/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php:22
    • > PHP Notice
      Undefined variable: option_defaults in wp-content/plugins/umich-oidc-login/includes/admin/settings-tab-general.php on line 25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: login, access-control, oidc, content restriction, groups

umich-oidc-login/umich-oidc-login.php Passed 13 tests

The principal PHP file in "UMich OIDC Login" v. 1.2.0 is loaded by WordPress automatically on each request
126 characters long description:
Restrict access to the whole site or only certain parts based on OpenID Connect (OIDC) login and group membership information.

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin63,111 lines of code in 404 files:
LanguageFilesBlank linesComment linesLines of code
PHP3831,56825,53533,223
JSON70029,019
JavaScript86478706
Sass3441138
XML10019
Bourne Shell1203
CSS1003

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.38
▷ Minimum class complexity1.00
▷ Maximum class complexity679.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces48
Interfaces3
Traits4
Classes354
▷ Abstract classes20858.76%
▷ Concrete classes14641.24%
▷ Final classes2517.12%
Methods1,686
▷ Static methods49029.06%
▷ Public methods1,19370.76%
▷ Protected methods24114.29%
▷ Private methods25214.95%
Functions39
▷ Named functions1025.64%
▷ Anonymous functions2974.36%
Constants319
▷ Global constants92.82%
▷ Class constants31097.18%
▷ Public constants310100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin