78% internet4associations-single-sign-on

Code Review | i4a Single Sign-On

WordPress plugin i4a Single Sign-On scored78%from 54 tests.

About plugin

  • Plugin page: internet4associat...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 11, 2018
  • Latest release: Jun 14, 2023
  • Number of updates: 72
  • Update frequency: every 25.4 days
  • Top authors: i4awordpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,133 total downloads

Benchmarks

Plugin footprint 83% 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.24MB] [CPU: ▼6.48ms] Passed 4 tests

Server-side resources used by i4a Single Sign-On
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1543.23 ▲2.54
Dashboard /wp-admin3.64 ▲0.2951.02 ▼11.79
Posts /wp-admin/edit.php3.69 ▲0.3352.04 ▲2.49
Add New Post /wp-admin/post-new.php6.16 ▲0.2784.36 ▼19.15
Media Library /wp-admin/upload.php3.50 ▲0.2740.96 ▲10.66
Import Roles /wp-admin/admin.php?page=Internet4Associations_import3.4633.81
Settings /wp-admin/admin.php?page=Internet4Associations3.5235.24
Help /wp-admin/admin.php?page=Internet4Associations_help3.4731.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for i4a Single Sign-On
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.21 ▼1.382.00 ▲0.2843.09 ▼3.28
Dashboard /wp-admin2,239 ▲515.82 ▲0.9499.90 ▼18.9775.93 ▲27.03
Posts /wp-admin/edit.php2,125 ▲361.98 ▼0.0339.15 ▲3.0533.72 ▼3.24
Add New Post /wp-admin/post-new.php1,542 ▲1223.12 ▲4.79772.87 ▲144.9754.02 ▲1.88
Media Library /wp-admin/upload.php1,415 ▲244.25 ▲0.06112.40 ▲12.8272.52 ▲28.10
Import Roles /wp-admin/admin.php?page=Internet4Associations_import8172.0222.7626.43
Settings /wp-admin/admin.php?page=Internet4Associations9161.9526.4128.57
Help /wp-admin/admin.php?page=Internet4Associations_help8682.0225.7029.28

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=Internet4Associations_import
    • > Warning in wp-content/plugins/internet4associations-single-sign-on/src/i4aAuth/Views/Internet4AssociationsImport.php+90
    include_once(wp-content/plugins/internet4associations-single-sign-on/assets/templates/importDisabled.tpl): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=Internet4Associations_import
    • > Warning in wp-content/plugins/internet4associations-single-sign-on/src/i4aAuth/Views/Internet4AssociationsImport.php+90
    include_once(): Failed opening 'wp-content/plugins/internet4associations-single-sign-on/assets/templates/importDisabled.tpl' for inclusion (include_path='.:/usr/share/php')

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
The following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\Page' not found in wp-content/plugins/internet4associations-single-sign-on/src/i4aAuth/Views/Render.php:5
    • > PHP Fatal error
      Trait 'WP\\Traits\\Helpers' not found in wp-content/plugins/internet4associations-single-sign-on/src/WP/Views/Page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\View' not found in wp-content/plugins/internet4associations-single-sign-on/src/i4aAuth/Views/Internet4AssociationsHelp.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/internet4associations-single-sign-on/src/Internet4Associations/Request.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\Form' not found in wp-content/plugins/internet4associations-single-sign-on/src/WP/Views/View.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\View' not found in wp-content/plugins/internet4associations-single-sign-on/src/i4aAuth/Views/Internet4Associations.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\View' not found in wp-content/plugins/internet4associations-single-sign-on/src/i4aAuth/Views/Internet4AssociationsImport.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

internet4associations-single-sign-on/i4a-single-sign-on.php 92% from 13 tests

The main file in "i4a Single Sign-On" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("internet4associations-single-sign-on.php" instead of "i4a-single-sign-on.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,436 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP20299801,430
JavaScript1106

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity10.89
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces8
Interfaces0
Traits2
Classes16
▷ Abstract classes212.50%
▷ Concrete classes1487.50%
▷ Final classes00.00%
Methods94
▷ Static methods3638.30%
▷ Public methods5760.64%
▷ Protected methods2526.60%
▷ Private methods1212.77%
Functions31
▷ Named functions2064.52%
▷ Anonymous functions1135.48%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.29MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/favicon.png3.74KB0.67KB▼ 82.19%
assets/images/i4a-header-logo-new.png81.01KB2.83KB▼ 96.51%
assets/images/i4a-header-logo.png81.01KB2.83KB▼ 96.51%
assets/images/logo.png17.01KB7.65KB▼ 55.01%
assets/screenshot-1.png118.06KB35.63KB▼ 69.82%