62% avectra-netforum-single-sign-on

Code Review | netFORUM Single Sign On

WordPress plugin netFORUM Single Sign On scored62%from 54 tests.

About plugin

  • Plugin page: avectra-netforum-...
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2012
  • Latest release: Jun 1, 2023
  • Number of updates: 137
  • Update frequency: every 21.2 days
  • Top authors: fsahsen (62.04%)gkher (39.42%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,483 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.49MB] [CPU: ▼4.15ms] Passed 4 tests

Analyzing server-side resources used by netFORUM Single Sign On
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5139.97 ▲4.10
Dashboard /wp-admin3.83 ▲0.4848.79 ▼14.12
Posts /wp-admin/edit.php3.88 ▲0.5245.74 ▲1.66
Add New Post /wp-admin/post-new.php6.35 ▲0.4683.96 ▼8.22
Media Library /wp-admin/upload.php3.75 ▲0.5247.34 ▲13.77
Cache /wp-admin/admin.php?page=netforum_cache3.7735.70
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius3.9234.56
Help /wp-admin/admin.php?page=netforum_help3.7534.05
General /wp-admin/admin.php?page=netforum3.7032.87

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 207 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
fs_debug_mode
widget_theysaidso_widget
widget_recent-posts
fs_accounts
widget_recent-comments
fs_gdpr
fs_active_plugins
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for netFORUM Single Sign On
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11614.47 ▼0.131.78 ▲0.0634.34 ▼4.85
Dashboard /wp-admin2,269 ▲845.85 ▼0.0394.51 ▼14.9963.47 ▲21.28
Posts /wp-admin/edit.php2,155 ▲662.03 ▲0.0035.68 ▼5.2534.85 ▲2.73
Add New Post /wp-admin/post-new.php1,710 ▲19022.45 ▼0.61687.06 ▲7.2047.17 ▼10.76
Media Library /wp-admin/upload.php1,451 ▲634.23 ▲0.0394.31 ▼18.5475.22 ▲28.51
Cache /wp-admin/admin.php?page=netforum_cache9092.1824.4143.29
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0951.6823.7625.78
Help /wp-admin/admin.php?page=netforum_help9582.1824.1634.73
General /wp-admin/admin.php?page=netforum9352.1925.7435.61

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 cannot be uninstalled
    • > Notice in wp-content/plugins/avectra-netforum-single-sign-on/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • db_upgraded
    • fs_debug_mode
    • fs_accounts
    • theysaidso_admin_options
    • fs_gdpr
    • fs_active_plugins
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=netforum
    • > Notice in wp-content/plugins/avectra-netforum-single-sign-on/src/WP/Views/View.php+17
    Only variables should be passed by reference
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=netforum
    • > Notice in wp-content/plugins/avectra-netforum-single-sign-on/src/WP/Views/View.php+66
    Undefined index: callback
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=netforum
    • > Notice in wp-content/plugins/avectra-netforum-single-sign-on/src/WP/Views/View.php+77
    Undefined index: filter
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=netforum
    • > Notice in wp-content/plugins/avectra-netforum-single-sign-on/src/WP/Views/View.php+77
    Undefined index: js
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=netforum
    • > Notice in wp-content/plugins/avectra-netforum-single-sign-on/src/WP/Views/View.php+77
    Undefined index: default

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
Please fix the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\View' not found in wp-content/plugins/avectra-netforum-single-sign-on/src/NetAuth/Views/Netforum.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\Form' not found in wp-content/plugins/avectra-netforum-single-sign-on/src/WP/Views/View.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\View' not found in wp-content/plugins/avectra-netforum-single-sign-on/src/NetAuth/Views/NetforumHelp.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\View' not found in wp-content/plugins/avectra-netforum-single-sign-on/src/NetAuth/Views/NetforumCache.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP\\Views\\Page' not found in wp-content/plugins/avectra-netforum-single-sign-on/src/NetAuth/Views/Render.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/avectra-netforum-single-sign-on/src/Netforum/Request.php:8
    • > PHP Fatal error
      Trait 'WP\\Traits\\Helpers' not found in wp-content/plugins/avectra-netforum-single-sign-on/src/WP/Views/Page.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=netforum_cache
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=netforum_cache 162:310 Uncaught SyntaxError: missing ) after argument list
    • > GET request to /wp-admin/admin.php?page=netforum_help
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=netforum_help 202:310 Uncaught SyntaxError: missing ) after argument list
    • > GET request to /wp-admin/admin.php?page=netforum
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=netforum 163:310 Uncaught SyntaxError: missing ) after argument list

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Enter your netFORUM xWeb URL and credentials in the Plugin Settings.)
You can take inspiration from this readme.txt

avectra-netforum-single-sign-on/avectra-netforum-single-sign-on.php Passed 13 tests

The entry point to "netFORUM Single Sign On" version 1.3.4 is a PHP file that has certain tags in its header comment area
74 characters long description:
Authenticate users to sign in using Avectra netFORUM credentials via xWeb.

Code Analysis 97% from 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 plugin46,766 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
PHP1247,41016,05531,089
PO File126,9518,44415,222
Markdown1680214
JavaScript43559200
JSON10027
CSS110014

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity67.95
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces8
Interfaces0
Traits2
Classes60
▷ Abstract classes46.67%
▷ Concrete classes5693.33%
▷ Final classes00.00%
Methods1,213
▷ Static methods20917.23%
▷ Public methods84569.66%
▷ Protected methods342.80%
▷ Private methods33427.54%
Functions120
▷ Named functions11091.67%
▷ Anonymous functions108.33%
Constants134
▷ Global constants10981.34%
▷ Class constants2518.66%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.47MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo_big.png83.09KB23.23KB▼ 72.04%
assets/screenshot-2.png80.46KB29.16KB▼ 63.76%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/avectra-netforum-single-sign-on.png9.16KB5.26KB▼ 42.58%
assets/banner-772x250.png49.49KB13.78KB▼ 72.16%