10% sb-login

Code Review | SB Login

WordPress plugin SB Login scored10%from 54 tests.

About plugin

  • Plugin page: sb-login
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2013
  • Latest release: May 23, 2014
  • Number of updates: 72
  • Update frequency: every 6.6 days
  • Top authors: fida02 (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

100+ active /35,423 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/sb-login/sb-login.php+117
    Methods with the same name as their class will not be constructors in a future version of PHP; NinetyAjaxLogin has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼56.70ms] Passed 4 tests

An overview of server-side resources used by SB Login
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.334.98 ▼36.82
Dashboard /wp-admin2.15 ▼1.1511.28 ▼48.26
Posts /wp-admin/edit.php2.16 ▼1.207.74 ▼47.77
Add New Post /wp-admin/post-new.php2.16 ▼3.737.10 ▼93.94
Media Library /wp-admin/upload.php2.16 ▼1.075.19 ▼34.57
Server Information /wp-admin/admin.php?page=sbl_server_info2.165.53
Settings /wp-admin/admin.php?page=sbl_settings2.165.58
How to Use /wp-admin/admin.php?page=sb-login/sbl_admin.php2.165.97

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for SB Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17513.69 ▼0.538.73 ▲6.7943.04 ▼5.16
Dashboard /wp-admin2,236 ▲334.94 ▼0.95105.41 ▲0.4476.75 ▲33.53
Posts /wp-admin/edit.php2,133 ▲332.00 ▼0.0139.97 ▼4.6732.82 ▼7.31
Add New Post /wp-admin/post-new.php1,569 ▲2323.11 ▲0.03660.38 ▲5.3856.60 ▼0.04
Media Library /wp-admin/upload.php1,433 ▲364.23 ▼0.03108.67 ▲5.9951.73 ▲4.59
Server Information /wp-admin/admin.php?page=sbl_server_info1,1944.49104.9760.14
Settings /wp-admin/admin.php?page=sbl_settings1,2334.37116.8941.77
How to Use /wp-admin/admin.php?page=sb-login/sbl_admin.php1,2584.4877.5343.12

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
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/sb-login/sb-login.php+117
    Methods with the same name as their class will not be constructors in a future version of PHP; NinetyAjaxLogin has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sb-login/sbl_admin.php
    • > Deprecated in wp-content/plugins/sb-login/sb-login.php+117
    Methods with the same name as their class will not be constructors in a future version of PHP; NinetyAjaxLogin has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sb-login/sbl_admin.php
    • > Deprecated in wp-content/plugins/sb-login/sb-login.php+172
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_mail_from has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sb-login/sbl_admin.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in NinetyAjaxLogin is deprecated since version 4.3.0! Use __construct() instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sbl_settings
    • > Warning in wp-content/plugins/sb-login/admin/settings.php+88
    Use of undefined constant Enabled - assumed 'Enabled' (this will throw an Error in a future version of PHP)

SRP 0% 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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/sb-login/admin/usage.php
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sbl_sidebar() in wp-content/plugins/sb-login/admin/usage.php:69
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sb-login/admin/settings.php on line 2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sb-login/admin/usage.php on line 1
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sb-login/sb-login.php on line 31
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sb-login/admin/usage.php on line 61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nd_login_current_url() in wp-content/plugins/sb-login/template/register-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/sb-login/sb-login.php:33
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sb-login/sb-login.php on line 30
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sb-login/admin/server_info.php on line 50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/sb-login/template/tabs.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sb-login/sbl_admin.php
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sb-login/sbl_admin.php
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
The official readme.txt is a good inspiration

sb-login/sb-login.php 92% from 13 tests

The primary PHP file in "SB Login" version 2.5 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 233 characters long)

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
Success! There were no dangerous files found in this plugin1,524 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1115740806
JavaScript2100115463
CSS185255

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon3.png0.42KB0.34KB▼ 18.52%
img/input.png0.12KB0.12KB0.00%
img/icon1.png4.96KB1.63KB▼ 67.05%
img/icon.png0.85KB0.85KB0.00%
img/wcz.png5.21KB5.33KB0.00%