84% wp-saml-auth

Code Review | WP SAML Auth

WordPress plugin WP SAML Auth scored84%from 54 tests.

About plugin

  • Plugin page: wp-saml-auth
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 18, 2016
  • Latest release: Nov 27, 2023
  • Number of updates: 113
  • Update frequency: every 24.7 days
  • Top authors: danielbachhuber (92.92%)getpantheon (7.96%)

Code review

54 tests

User reviews

7 reviews

Install metrics

5,000+ active /75,040 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼4.34ms] Passed 4 tests

An overview of server-side resources used by WP SAML Auth
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.82 ▼4.25
Dashboard /wp-admin3.48 ▲0.1846.43 ▼4.45
Posts /wp-admin/edit.php3.59 ▲0.2445.00 ▼2.28
Add New Post /wp-admin/post-new.php6.06 ▲0.1785.87 ▼6.37
Media Library /wp-admin/upload.php3.40 ▲0.1739.10 ▲7.66
WP SAML Auth /wp-admin/options-general.php?page=wp-saml-auth-settings3.3732.38

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP SAML Auth
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5814.22 ▼0.131.55 ▼0.1127.05 ▼19.33
Dashboard /wp-admin2,208 ▲285.54 ▼0.1095.35 ▼0.4844.93 ▲3.61
Posts /wp-admin/edit.php2,116 ▲161.94 ▼0.0435.24 ▼4.1034.71 ▼0.25
Add New Post /wp-admin/post-new.php1,541 ▲623.24 ▲4.55691.48 ▲26.3956.91 ▼2.22
Media Library /wp-admin/upload.php1,419 ▲164.28 ▲0.1198.67 ▲2.6845.71 ▲2.15
WP SAML Auth /wp-admin/options-general.php?page=wp-saml-auth-settings1,0122.1625.9433.07

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-saml-auth/wp-saml-auth.php:160

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
2 plugin tags: authentication, saml

wp-saml-auth/wp-saml-auth.php Passed 13 tests

This is the main PHP file of "WP SAML Auth" version 2.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
SAML authentication for WordPress, using SimpleSAMLphp.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected11,363 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,2313,6887,255
XSD12233402,414
Markdown240701,263
PO File15172188
JSON410179
YAML18244
XML10020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity54.29
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity4.72
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods341
▷ Static methods10931.96%
▷ Public methods30990.62%
▷ Protected methods61.76%
▷ Private methods267.62%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants157
▷ Global constants10.64%
▷ Class constants15699.36%
▷ Public constants156100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected