68% blaatschaap-oauth

Code Review | BlaatLogin: OAuth

WordPress plugin BlaatLogin: OAuth scored68%from 54 tests.

About plugin

  • Plugin page: blaatschaap-oauth
  • Plugin version: ","blaatschaap");...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-4.2.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2013
  • Latest release: Jan 3, 2016
  • Number of updates: 31
  • Update frequency: every 23.7 days
  • Top authors: GromBeestje (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,379 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.92MB] [CPU: ▼7.35ms] Passed 4 tests

This is a short check of server-side resources used by BlaatLogin: OAuth
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.64 ▲1.1843.20 ▲2.56
Dashboard /wp-admin4.59 ▲1.2852.49 ▲0.15
Posts /wp-admin/edit.php4.62 ▲1.2754.65 ▲8.46
Add New Post /wp-admin/post-new.php5.83 ▼0.0551.66 ▼40.23
Media Library /wp-admin/upload.php4.53 ▲1.3041.34 ▲8.12
Install Plugins /wp-admin/themes.php?page=blaat_plugin_deps4.6340.56

Server storage [IO: ▲0.52MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 74 new files
Database: 5 new tables, 9 new options
New tables
wp_bs_oauth_services_configured
wp_bs_oauth_tokens
wp_bs_oauth_services_known
wp_bs_oauth_accounts
wp_bs_oauth_userinfo_api_known
New WordPress options
bs_oauth_dbversion
bs_oauth_dataversion
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
bs_auth_signup_user_email

Browser metrics Passed 4 tests

A check of browser resources used by BlaatLogin: OAuth
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6214.08 ▼0.711.70 ▲0.0641.64 ▼4.40
Dashboard /wp-admin2,228 ▲515.64 ▼0.0390.36 ▼12.2546.98 ▲2.86
Posts /wp-admin/edit.php2,142 ▲392.02 ▲0.0639.92 ▼5.1239.98 ▼1.78
Add New Post /wp-admin/post-new.php1,555 ▲2922.92 ▼0.27591.89 ▼71.5250.60 ▼3.86
Media Library /wp-admin/upload.php1,441 ▲384.20 ▼0.0197.58 ▼2.6345.68 ▲4.01
Install Plugins /wp-admin/themes.php?page=blaat_plugin_deps1,0382.0527.4033.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 5 tables
    • wp_bs_oauth_services_known
    • wp_bs_oauth_accounts
    • wp_bs_oauth_tokens
    • wp_bs_oauth_userinfo_api_known
    • wp_bs_oauth_services_configured
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • bs_auth_signup_user_email
    • widget_recent-comments
    • db_upgraded
    • bs_oauth_dataversion
    • widget_theysaidso_widget
    • bs_oauth_dbversion

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/blaatschaap-oauth/oauth/test_oauth_client.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/blaatschaap-oauth/tgm/class-tgm-plugin-activation.php:1915
    • > OAuth client
      Checking the authentication state in URI /wp-content/plugins/blaatschaap-oauth/oauth/test_oauth_client.php
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/blaatschaap-oauth/tgm/class-tgm-plugin-activation.php:1915
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blaatschaap-oauth/bsauth.php:462
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/blaatschaap-oauth/tgm/class-tgm-plugin-activation.php:1915
    • > OAuth client
      Error: the dialog URL is not defined for this server
    • > OAuth client
      A valid access token is not available
    • > OAuth client
      Checking if OAuth access token was already retrieved from

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: sso, oauth, authentication

blaatschaap-oauth/blaat.php 85% from 13 tests

The entry point to "BlaatLogin: OAuth" version ","blaatschaap");... is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("blaatschaap-oauth.php" instead of "blaat.php")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "","blaatschaap");...")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected8,446 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP131,1123,6486,919
PO File3232562538
CSS39766391
JSON1490371
HTML1281124
SQL16057
Markdown217046

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 129)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity108.00
▷ Minimum class complexity1.00
▷ Maximum class complexity629.00
Average method complexity8.56
▷ Minimum method complexity1.00
▷ Maximum method complexity129.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods193
▷ Static methods52.59%
▷ Public methods17289.12%
▷ Protected methods2010.36%
▷ Private methods10.52%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
42 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/google.png0.95KB0.68KB▼ 28.19%
icons/dropbox.png1.10KB0.95KB▼ 13.77%
icons/vk.png0.87KB0.62KB▼ 29.26%
css/paypal.png1.58KB1.63KB0.00%
css/yandex.png0.65KB0.57KB▼ 12.99%