74% single-sign-on-into-talentlms-user-sync-integration

Code Review | Single Sign-On into TalentLMS User Sync Integration

WordPress plugin Single Sign-On into TalentLMS User Sync Integration scored74%from 54 tests.

About plugin

  • Plugin page: single-sign-on-in...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 6.3.1
  • First release: Apr 28, 2022
  • Latest release: Apr 28, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: nimeshatxecurify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /319 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.74MB] [CPU: ▲1.17ms] Passed 4 tests

Analyzing server-side resources used by Single Sign-On into TalentLMS User Sync Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8341.59 ▼0.34
Dashboard /wp-admin4.03 ▲0.7247.62 ▼1.65
Posts /wp-admin/edit.php4.14 ▲0.7849.04 ▲5.85
Add New Post /wp-admin/post-new.php6.63 ▲0.7486.70 ▲0.80
Media Library /wp-admin/upload.php3.95 ▲0.7239.29 ▲7.87
Attribute/Role Mapping /wp-admin/admin.php?page=idp_attr_settings4.0337.43
WordPress TalentLMS Integration /wp-admin/admin.php?page=idp_settings4.0335.45
IDP Metadata /wp-admin/admin.php?page=idp_metadata4.1738.55
Service Providers /wp-admin/admin.php?page=idp_configure_idp4.0938.38

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 98 new files
Database: 2 new tables, 6 new options
New tables
wp_mo_sp_data
wp_mo_sp_attributes
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Single Sign-On into TalentLMS User Sync Integration: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲8113.39 ▼0.903.96 ▲1.7339.66 ▼11.10
Dashboard /wp-admin2,247 ▲625.10 ▲0.24102.58 ▼15.7270.01 ▲27.51
Posts /wp-admin/edit.php2,127 ▲382.07 ▲0.0636.48 ▼0.8136.82 ▲1.97
Add New Post /wp-admin/post-new.php1,546 ▲1317.72 ▼5.41709.19 ▲55.1453.65 ▼13.39
Media Library /wp-admin/upload.php1,426 ▲354.24 ▼0.0598.69 ▼3.3872.56 ▲27.78
Attribute/Role Mapping /wp-admin/admin.php?page=idp_attr_settings8912.0326.8333.28
WordPress TalentLMS Integration /wp-admin/admin.php?page=idp_settings9632.0925.9335.64
IDP Metadata /wp-admin/admin.php?page=idp_metadata1,0981.6925.3254.37
Service Providers /wp-admin/admin.php?page=idp_configure_idp1,2021.6826.3631.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 33× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_sp_list() on null in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/controllers/sso-idp-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'MSTUSI\\Helper\\Factory\\ResponseHandlerFactory' not found in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/helper/saml2/GenerateResponse.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'MSTUSI\\Handler\\BaseHandler' not found in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/handler/SPSettingsUtility.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'MSTUSI\\Handler\\BaseHandler' not found in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/handler/IDPSettingsHandler.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/controllers/sso-idp-navbar.php:6
    • > PHP Fatal error
      Trait 'MSTUSI\\Helper\\Traits\\Instance' not found in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/MoIDP.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/views/attr-settings.php:16
    • > PHP Warning
      include(): Failed opening 'MSTUSI_DIRviews/plugin-details.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/controllers/plugin-details.php on line 9
    • > PHP Fatal error
      Trait 'MSTUSI\\Helper\\Traits\\Instance' not found in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/actions/SSOActions.php on line 21
    • > PHP Fatal error
      Uncaught Error: Interface 'MSTUSI\\Helper\\Factory\\RequestHandlerFactory' not found in wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/helper/saml2/AuthnRequest.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (SSO config Page And TalentLMS Integration Page) image missing
Please take inspiration from this readme.txt

single-sign-on-into-talentlms-user-sync-integration/MoIDPSettings.php 92% from 13 tests

The main file in "Single Sign-On into TalentLMS User Sync Integration" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("single-sign-on-into-talentlms-user-sync-integration.php" instead of "MoIDPSettings.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/includes/resources/idp-signing-new.crt
      • wp-content/plugins/single-sign-on-into-talentlms-user-sync-integration/includes/resources/idp-signing.crt
7,336 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP839121,0336,247
CSS2177184979
JavaScript2212384
XML10026

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.56
▷ Minimum class complexity1.00
▷ Maximum class complexity154.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces11
Interfaces2
Traits1
Classes65
▷ Abstract classes11.54%
▷ Concrete classes6498.46%
▷ Final classes1421.88%
Methods392
▷ Static methods6115.56%
▷ Public methods33284.69%
▷ Protected methods51.28%
▷ Private methods5514.03%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants91
▷ Global constants1415.38%
▷ Class constants7784.62%
▷ Public constants77100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/61456.png3.64KB3.62KB▼ 0.62%
includes/images/miniorange.png1.08KB1.08KB0.00%
includes/images/logo.png2.84KB1.59KB▼ 44.03%
includes/images/miniorange_icon.png0.44KB0.35KB▼ 18.61%