84% shibboleth

Code Review | Shibboleth

WordPress plugin Shibboleth scored84%from 54 tests.

About plugin

  • Plugin page: shibboleth
  • Plugin version: 2.4.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 1, 2008
  • Latest release: Oct 31, 2023
  • Number of updates: 101
  • Update frequency: every 54.2 days
  • Top authors: wnorris (51.49%)michaelryanmcneill (23.76%)mitchoyoshitaka (18.81%)jrchamp (7.92%)willnorris (1.98%)

Code review

54 tests

User reviews

7 reviews

Install metrics

3,000+ active /42,819 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.26MB] [CPU: ▼4.08ms] Passed 4 tests

A check of server-side resources used by Shibboleth
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1538.60 ▼6.83
Dashboard /wp-admin3.62 ▲0.2758.95 ▼0.77
Posts /wp-admin/edit.php3.73 ▲0.3754.29 ▲4.67
Add New Post /wp-admin/post-new.php6.20 ▲0.3187.79 ▼9.82
Media Library /wp-admin/upload.php3.54 ▲0.3138.26 ▲1.10
Shibboleth /wp-admin/options-general.php?page=shibboleth-options3.5137.71

Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification found: 1 file (0.98KB) outside of "wp-content/plugins/shibboleth/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Shibboleth
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.36 ▲0.091.77 ▼0.0939.52 ▼3.60
Dashboard /wp-admin2,202 ▲215.63 ▼0.1185.01 ▼18.7838.82 ▼1.02
Posts /wp-admin/edit.php2,101 ▼21.99 ▼0.0439.17 ▼2.0336.02 ▼0.58
Add New Post /wp-admin/post-new.php1,529 ▲123.10 ▼0.01631.86 ▼43.5558.96 ▼8.72
Media Library /wp-admin/upload.php1,404 ▲74.26 ▲0.03107.02 ▼7.5141.47 ▼4.38
Shibboleth /wp-admin/options-general.php?page=shibboleth-options1,1102.0023.6546.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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 fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shibboleth/options-admin.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shibboleth/options-user.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/shibboleth/shibboleth.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
4 plugin tags: shibboleth, login, authentication, saml

shibboleth/shibboleth.php Passed 13 tests

The main PHP file in "Shibboleth" ver. 2.4.3 adds more information about the plugin and also serves as the entry point for this plugin
71 characters long description:
Easily externalize user authentication to a Shibboleth Service Provider

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,661 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP32195111,537
CSS117588
JSON10018
JavaScript131613
Markdown1305

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions47
▷ Named functions4697.87%
▷ Anonymous functions12.13%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png3.49KB1.80KB▼ 48.46%