10% jwt-single-sign-on

Code Review | JWT Single Sign On

WordPress plugin JWT Single Sign On scored10%from 54 tests.

About plugin

  • Plugin page: jwt-single-sign-on
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: May 4, 2019
  • Latest release: May 9, 2019
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: seschi98 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,316 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/jwt-single-sign-on/src/class-jwt-sso-client.php+66
    Undefined variable: default_settings

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.57ms] Passed 4 tests

This is a short check of server-side resources used by JWT Single Sign On
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1345.45 ▲1.56
Dashboard /wp-admin3.43 ▲0.0853.19 ▼6.71
Posts /wp-admin/edit.php3.52 ▲0.1755.77 ▲14.95
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.94 ▼14.89
Media Library /wp-admin/upload.php3.35 ▲0.1243.56 ▲5.75
Single Sign On /wp-admin/options-general.php?page=jwt_sso_options3.2937.35

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for JWT Single Sign On
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.63 ▼0.621.57 ▼0.1437.94 ▼4.83
Dashboard /wp-admin2,210 ▲225.86 ▲0.01105.46 ▼3.5940.95 ▲5.56
Posts /wp-admin/edit.php2,096 ▲71.97 ▼0.0538.81 ▼1.7736.44 ▲0.03
Add New Post /wp-admin/post-new.php1,522 ▼2023.25 ▲4.69669.90 ▲35.9753.92 ▼11.45
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.0697.20 ▼2.0545.81 ▲1.38
Single Sign On /wp-admin/options-general.php?page=jwt_sso_options9201.7625.3529.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jwt_sso_options
    • > Notice in wp-content/plugins/jwt-single-sign-on/src/admin-options.php+124
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/jwt-single-sign-on/src/admin-options.php
    • > /wp-content/plugins/jwt-single-sign-on/jwt-sso.php
    • > /wp-content/plugins/jwt-single-sign-on/src/functions.php
    • > /wp-content/plugins/jwt-single-sign-on/src/class-jwt-sso-client.php
    • > /wp-content/plugins/jwt-single-sign-on/src/callback.php
    • > /wp-content/plugins/jwt-single-sign-on/src/rewrites.php
    • > /wp-content/plugins/jwt-single-sign-on/src/filters.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: singlesignon, jwt, login, sso, token...

jwt-single-sign-on/jwt-sso.php 92% from 13 tests

The principal PHP file in "JWT Single Sign On" v. 1.2.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("jwt-single-sign-on.php" instead of "jwt-sso.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,439 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS250481,266
PHP18204402901
Markdown1320168
JSON30092
JavaScript11012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.40
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods51
▷ Static methods1631.37%
▷ Public methods4792.16%
▷ Protected methods00.00%
▷ Private methods47.84%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png61.07KB24.72KB▼ 59.51%