10% blaatschaap-sso-vatsim

Code Review | BlaatSchaap SSO: VATSIM

WordPress plugin BlaatSchaap SSO: VATSIM scored10%from 54 tests.

About plugin

  • Plugin page: blaatschaap-sso-v...
  • Plugin version: 0.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Apr 6, 2015
  • Latest release: Apr 7, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: GromBeestje (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,108 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/blaatschaap-sso-vatsim/blaatvatim.php+46
    Use of undefined constant bs_vatsimsso_menu - assumed 'bs_vatsimsso_menu' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.70MB] [CPU: ▼53.45ms] Passed 4 tests

An overview of server-side resources used by BlaatSchaap SSO: VATSIM
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.187.99 ▼34.73
Dashboard /wp-admin2.30 ▼1.009.07 ▼42.63
Posts /wp-admin/edit.php2.30 ▼1.059.29 ▼42.09
Add New Post /wp-admin/post-new.php2.30 ▼3.589.72 ▼94.36
Media Library /wp-admin/upload.php2.30 ▼0.9210.09 ▼29.23
Auth Config /wp-admin/admin.php?page=bsauth_pages_plugins2.309.02
Vatsim Config /wp-admin/admin.php?page=bs_vatsimsso_services2.3012.84
BlaatSchaap /wp-admin/admin.php?page=blaat_plugins2.308.79
Vatsim Add /wp-admin/admin.php?page=bs_vatsimsso_add2.309.30

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: 2 new tables, 7 new options
New tables
wp_bs_vatsimsso_sessions
wp_bs_vatsimsso_services
New WordPress options
bs_vatsimsso_dbversion
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

BlaatSchaap SSO: VATSIM: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲7614.43 ▼0.321.87 ▼0.6939.63 ▼6.08
Dashboard /wp-admin2,245 ▲605.87 ▲0.96102.68 ▼16.0237.54 ▼9.51
Posts /wp-admin/edit.php2,128 ▲422.06 ▲0.0242.57 ▲1.9334.10 ▼3.50
Add New Post /wp-admin/post-new.php1,451 ▼6322.27 ▲4.54537.21 ▼166.2745.29 ▼17.21
Media Library /wp-admin/upload.php1,427 ▲364.22 ▲0.07107.64 ▲2.2044.27 ▼2.95
Auth Config /wp-admin/admin.php?page=bsauth_pages_plugins8972.0526.4628.57
Vatsim Config /wp-admin/admin.php?page=bs_vatsimsso_services7952.0328.5327.84
BlaatSchaap /wp-admin/admin.php?page=blaat_plugins8582.0629.0529.87
Vatsim Add /wp-admin/admin.php?page=bs_vatsimsso_add1,0122.0726.5134.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bsauth_btn handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_bs_vatsimsso_services
    • wp_bs_vatsimsso_sessions
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • bs_vatsimsso_dbversion
    • widget_recent-posts

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
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_add
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bsauth_btn handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_add
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bsauth_btn handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_add
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the blaat_auth handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_add
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the blaat_auth handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_add
    • > Warning in wp-content/plugins/blaatschaap-sso-vatsim/blaatvatim.php+46
    Use of undefined constant bs_vatsimsso_menu - assumed 'bs_vatsimsso_menu' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_add
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_add
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_services
    • > Notice in wp-content/plugins/blaatschaap-sso-vatsim/bs_vatsimsso_config.php+453
    Undefined index: add_service
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_services
    • > Notice in wp-content/plugins/blaatschaap-sso-vatsim/bs_vatsimsso_config.php+454
    Undefined index: delete_service
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_services
    • > Notice in wp-content/plugins/blaatschaap-sso-vatsim/bs_vatsimsso_config.php+455
    Undefined index: update_service

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/blaatschaap-sso-vatsim/blaat.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/blaatschaap-sso-vatsim/blaat.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'AuthService' not found in wp-content/plugins/blaatschaap-sso-vatsim/classes/VatsimSSO.class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blaatschaap-sso-vatsim/bsauth.php:431

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=blaat_plugins
    • > Network (severe)
    http://www.blaatschaap.be/sheep.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bs_vatsimsso_add
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=bs_vatsimsso_add 153:38 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: authentication, sso, vatsim

blaatschaap-sso-vatsim/blaatvatim.php 92% from 13 tests

The main file in "BlaatSchaap SSO: VATSIM" v. 0.4.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: Name the main plugin file the same as the plugin slug ("blaatschaap-sso-vatsim.php" instead of "blaatvatim.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 plugin2,053 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP84504281,670
PO File2136327320
CSS2151463

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.18
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes10
▷ Abstract classes220.00%
▷ Concrete classes880.00%
▷ Final classes00.00%
Methods67
▷ Static methods913.43%
▷ Public methods6191.04%
▷ Protected methods11.49%
▷ Private methods57.46%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/vatsim.png2.45KB1.60KB▼ 34.53%