10% fusionspan-impexium-single-sign-on

Code Review | Impexium Single Sign On

WordPress plugin Impexium Single Sign On scored 10% from 54 tests.

About plugin

  • Plugin page: fusionspan-impexi...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 5.9.2
  • First release: Feb 5, 2018
  • Latest release: Mar 21, 2022
  • Number of updates: 42
  • Update frequency: every 36.1 days
  • Top authors: gkher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 891 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/fusionspan-impexium-single-sign-on/wp-bootstrap/src/WP/Views/Input.php+153
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▲3.99MB] [CPU: ▼317.89ms] Passed 4 tests

A check of server-side resources used by Impexium Single Sign On
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.35 ▲4.8425.58 ▼27.26
Dashboard /wp-admin8.37 ▲4.9724.86 ▼8.34
Posts /wp-admin/edit.php8.37 ▲4.7324.28 ▼13.71
Add New Post /wp-admin/post-new.php8.37 ▲1.4024.05 ▼1,222.25
Media Library /wp-admin/upload.php8.37 ▲5.0722.94 ▼5.57
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius8.3727.51

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 202 new files
Database: no new tables, 4 new options
New WordPress options
fs_debug_mode
fs_active_plugins
fs_accounts
fs_gdpr

Browser metrics Passed 4 tests

An overview of browser requirements for Impexium Single Sign On
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,828 ▲7415.91 ▼0.075.76 ▼0.602.16 ▼0.25
Dashboard /wp-admin2,958 ▲1006.17 ▼0.13118.39 ▼17.42185.02 ▲27.76
Posts /wp-admin/edit.php2,755 ▲673.11 ▼0.1360.71 ▼1.46158.00 ▲19.55
Add New Post /wp-admin/post-new.php1,736 ▲7518.74 ▲2.41416.50 ▼2.21191.89 ▲19.19
Media Library /wp-admin/upload.php1,758 ▲605.56 ▲0.06124.57 ▼23.82234.03 ▲43.48
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4682.4754.19113.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/fusionspan-impexium-single-sign-on/wp-bootstrap/src/WP/Views/Input.php+153
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_debug_mode
    • fs_accounts
    • fs_gdpr
    • fs_active_plugins

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Deprecated in wp-content/plugins/fusionspan-impexium-single-sign-on/wp-bootstrap/src/WP/Views/Input.php+153
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-content/plugins/fusionspan-impexium-single-sign-on/wp-bootstrap/src/WP/Traits/Helpers.php+51
    Only variables should be passed by reference

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/fusionspan-impexium-single-sign-on/freemius/templates/ajax-loader.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/fusionspan-impexium-single-sign-on/freemius/templates/account/partials/addon.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\View' not found in wp-content/plugins/fusionspan-impexium-single-sign-on/Views/Impexium.php:8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/fusionspan-impexium-single-sign-on/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fusionspan-impexium-single-sign-on/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\Form' not found in wp-content/plugins/fusionspan-impexium-single-sign-on/wp-bootstrap/src/WP/Views/View.php:10
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/fusionspan-impexium-single-sign-on/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\Page' not found in wp-content/plugins/fusionspan-impexium-single-sign-on/Views/Render.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/fusionspan-impexium-single-sign-on/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fusionspan-impexium-single-sign-on/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/fusionspan-impexium-single-sign-on/freemius/templates/account/partials/addon.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #2 is missing in fusionspan-impexium-single-sign-on/assets to your readme.txt
  • Screenshots: Please add an image for screenshot #1 (Enter your Impexium API URL and credentials in the Plugin Settings.)
You can look at the official readme.txt

fusionspan-impexium-single-sign-on/fusionspan-impexium-single-sign-on.php Passed 13 tests

The principal PHP file in "Impexium Single Sign On" v. 1.1 is loaded by WordPress automatically on each request
69 characters long description:
Authenticate users to sign in using Impexium credentials via RestAPI.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected47,397 lines of code in 152 files:
LanguageFilesBlank linesComment linesLines of code
PHP1227,52816,29631,703
PO File126,9518,44415,222
JavaScript53761217
Markdown1680214
JSON10027
CSS110014

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity70.43
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces4
Interfaces0
Traits2
Classes58
▷ Abstract classes46.90%
▷ Concrete classes5493.10%
▷ Final classes00.00%
Methods1,235
▷ Static methods22318.06%
▷ Public methods86570.04%
▷ Protected methods332.67%
▷ Private methods33727.29%
Functions121
▷ Named functions11695.87%
▷ Anonymous functions54.13%
Constants134
▷ Global constants10981.34%
▷ Class constants2518.66%
▷ Public constants25100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.54MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png79.33KB29.58KB▼ 62.71%
assets/images/logo.png1.47KB0.84KB▼ 43.07%
assets/screenshot-2.png83.87KB32.92KB▼ 60.75%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/images/logo_big.png15.20KB6.14KB▼ 59.60%