58% miniorange-wp-as-saml-idp

Code Review | Login using WordPress Users ( WP as SAML IDP )

WordPress plugin Login using WordPress Users ( WP as SAML IDP ) scored58%from 54 tests.

About plugin

  • Plugin page: miniorange-wp-as-...
  • Plugin version: 1.15.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Jan 26, 2016
  • Latest release: Aug 17, 2023
  • Number of updates: 82
  • Update frequency: every 33.7 days
  • Top authors: cyberlord92 (81.71%)nimeshatxecurify (19.51%)

Code review

54 tests

User reviews

45 reviews

Install metrics

900+ active /20,112 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.00MB] [CPU: ▲3.74ms] Passed 4 tests

This is a short check of server-side resources used by Login using WordPress Users ( WP as SAML IDP )
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.58 ▲1.1247.34 ▲6.71
Dashboard /wp-admin4.29 ▲0.9955.13 ▲3.43
Posts /wp-admin/edit.php4.39 ▲1.0357.18 ▲2.71
Add New Post /wp-admin/post-new.php6.88 ▲0.9995.13 ▲2.09
Media Library /wp-admin/upload.php4.22 ▲0.9951.61 ▲14.67
Attribute / Role Mapping /wp-admin/admin.php?page=idp_attr_settings4.2244.21
Request a Demo /wp-admin/admin.php?page=idp_request_demo4.2243.73
Add-Ons /wp-admin/admin.php?page=idp_addons4.2238.85
Service Providers /wp-admin/admin.php?page=idp_configure_idp4.2743.18
SSO Options /wp-admin/admin.php?page=idp_signin_settings4.2240.72
IDP Metadata /wp-admin/admin.php?page=idp_metadata4.3148.68
WordPress IDP /wp-admin/admin.php?page=idp_settings4.2243.67
Support /wp-admin/admin.php?page=idp_support4.2241.09
License /wp-admin/admin.php?page=idp_upgrade_settings4.2343.09
Account Setup /wp-admin/admin.php?page=idp_profile4.2246.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 192 new files
Database: 2 new tables, 6 new options
New tables
wp_mo_sp_attributes
wp_mo_sp_data
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Login using WordPress Users ( WP as SAML IDP )
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,043 ▲28213.70 ▼0.681.75 ▼0.1644.32 ▼3.76
Dashboard /wp-admin2,437 ▲2314.95 ▲0.02114.47 ▲9.7864.22 ▲22.26
Posts /wp-admin/edit.php2,331 ▲2282.06 ▲0.0741.17 ▼1.0537.06 ▼1.56
Add New Post /wp-admin/post-new.php1,905 ▲35624.82 ▲1.62707.91 ▲8.3434.60 ▼31.09
Media Library /wp-admin/upload.php1,628 ▲2284.20 ▲0.02101.19 ▼8.6486.61 ▲37.26
Attribute / Role Mapping /wp-admin/admin.php?page=idp_attr_settings1,3832.0928.4865.00
Request a Demo /wp-admin/admin.php?page=idp_request_demo1,3312.0826.4252.57
Add-Ons /wp-admin/admin.php?page=idp_addons1,3762.1828.1752.65
Service Providers /wp-admin/admin.php?page=idp_configure_idp1,6442.1928.3573.53
SSO Options /wp-admin/admin.php?page=idp_signin_settings1,2642.2129.8050.63
IDP Metadata /wp-admin/admin.php?page=idp_metadata1,5012.1927.3462.58
WordPress IDP /wp-admin/admin.php?page=idp_settings1,4002.0625.5068.76
Support /wp-admin/admin.php?page=idp_support1,2802.1025.9243.42
License /wp-admin/admin.php?page=idp_upgrade_settings1,7282.1024.7973.23
Account Setup /wp-admin/admin.php?page=idp_profile1,3062.0926.8047.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_mo_sp_attributes
    • wp_mo_sp_data
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idp_signin_settings
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/miniorange-wp-as-saml-idp/autoload.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

miniorange-wp-as-saml-idp/MoIDPSettings.php 92% from 13 tests

"Login using WordPress Users ( WP as SAML IDP )" version 1.15.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("miniorange-wp-as-saml-idp.php" instead of "MoIDPSettings.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/miniorange-wp-as-saml-idp/includes/resources/idp-signing-new.crt
      • wp-content/plugins/miniorange-wp-as-saml-idp/includes/resources/idp-signing.crt
10,209 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
PHP1161,2864,8228,363
CSS2149201,496
JavaScript43018237
SVG10175
XML10026
HTML20012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.46
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces13
Interfaces2
Traits1
Classes75
▷ Abstract classes11.33%
▷ Concrete classes7498.67%
▷ Final classes1621.62%
Methods424
▷ Static methods6615.57%
▷ Public methods31875.00%
▷ Protected methods10.24%
▷ Private methods10524.76%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants145
▷ Global constants1611.03%
▷ Class constants12988.97%
▷ Public constants129100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
55 PNG files occupy 1.48MB with 0.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/moodle.png8.04KB4.19KB▼ 47.84%
includes/images/normal.png15.74KB7.91KB▼ 49.78%
includes/images/idp_support.png12.17KB8.49KB▼ 30.28%
includes/images/idp_profile.png12.69KB8.88KB▼ 29.99%
includes/images/complete-wp-member.png34.26KB6.14KB▼ 82.07%