74% wsfed-client

Code Review | WS-Fed client

WordPress plugin WS-Fed client scored 74% from 54 tests.

About plugin

  • Plugin page: wsfed-client
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1
  • WordPress version: 5.9.2
  • First release: Sep 21, 2017
  • Latest release: Jun 11, 2019
  • Number of updates: 13
  • Update frequency: every 48.4 days
  • Top authors: cyberlord92 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.70MB] [CPU: ▼292.28ms] Passed 4 tests

An overview of server-side resources used by WS-Fed client
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.25 ▲0.7463.55 ▲3.13
Dashboard /wp-admin4.09 ▲0.6941.11 ▼2.58
Posts /wp-admin/edit.php4.38 ▲0.7446.61 ▲6.70
Add New Post /wp-admin/post-new.php7.65 ▲0.65112.78 ▼1,172.68
Media Library /wp-admin/upload.php4.03 ▲0.7434.68 ▲3.03

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 1 new option
New WordPress options
widget_saml_login_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WS-Fed client
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲3616.05 ▲0.905.58 ▼1.142.25 ▼0.43
Dashboard /wp-admin2,917 ▲596.28 ▲0.07119.78 ▼18.20170.33 ▼0.58
Posts /wp-admin/edit.php2,715 ▲213.28 ▲0.0464.55 ▼2.49141.86 ▼1.44
Add New Post /wp-admin/post-new.php1,681 ▼7116.28 ▼5.13402.23 ▼37.53206.77 ▲48.83
Media Library /wp-admin/upload.php1,726 ▲285.72 ▲0.29121.98 ▼24.15196.02 ▲8.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_saml_login_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wsfed-client/mo_login_saml_sso_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wsfed-client/mo_login_saml_sso_widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: ws federation, ws-fed, ws fed, wsfed, sso

wsfed-client/login.php 92% from 13 tests

"WS-Fed client" version 2.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wsfed-client.php" instead of "login.php")

Code Analysis 5% from 3 tests

File types 0% from 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
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wsfed-client/resources/sp-certificate.crt
5,284 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP85654214,076
CSS641411,110
JavaScript4255198

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity60.00
▷ Minimum class complexity3.00
▷ Maximum class complexity136.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods124
▷ Static methods3629.03%
▷ Public methods10887.10%
▷ Protected methods00.00%
▷ Private methods1612.90%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants27
▷ Global constants00.00%
▷ Class constants27100.00%
▷ Public constants27100.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
14 PNG files occupy 0.24MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/css/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
images/saml_working.png11.20KB4.91KB▼ 56.13%
includes/css/images/flags16.png61.80KB19.90KB▼ 67.79%
includes/css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
images/green_check.png43.25KB16.06KB▼ 62.87%