62% login-sidebar-widget

Code Review | Login Widget With Shortcode

WordPress plugin Login Widget With Shortcode scored62%from 54 tests.

About plugin

  • Plugin page: login-sidebar-widget
  • Plugin version: 6.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 12, 2014
  • Latest release: Jul 10, 2023
  • Number of updates: 289
  • Update frequency: every 11.9 days
  • Top authors: avi.megladon (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

10,000+ active /442,825 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.27MB] [CPU: ▼3.46ms] Passed 4 tests

A check of server-side resources used by Login Widget With Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3141.89 ▲1.72
Dashboard /wp-admin3.61 ▲0.2752.85 ▼6.71
Posts /wp-admin/edit.php3.66 ▲0.3147.46 ▲3.09
Add New Post /wp-admin/post-new.php6.15 ▲0.2684.84 ▼11.93
Media Library /wp-admin/upload.php3.47 ▲0.2436.15 ▲5.31
Login Widget Settings /wp-admin/admin.php?page=login_widget_ap3.5646.64
Login Logs /wp-admin/admin.php?page=login_log_ap3.4132.66

Server storage [IO: ▲0.91MB] [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: 97 new files
Database: 1 new table, 11 new options
New tables
wp_login_log
New WordPress options
theysaidso_admin_options
new_password_mail_subject
widget_recent-comments
widget_login_wid
widget_theysaidso_widget
forgot_password_link_mail_subject
widget_recent-posts
db_upgraded
can_compress_scripts
forgot_password_link_mail_body
...

Browser metrics Passed 4 tests

Checking browser requirements for Login Widget With Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19813.73 ▼0.857.01 ▲5.1541.38 ▼2.77
Dashboard /wp-admin2,239 ▲574.91 ▲0.04113.44 ▼6.6942.77 ▼2.00
Posts /wp-admin/edit.php2,122 ▲302.04 ▲0.0036.58 ▲0.3131.75 ▼6.25
Add New Post /wp-admin/post-new.php1,542 ▲2017.49 ▼5.56644.04 ▼1.1028.43 ▼27.69
Media Library /wp-admin/upload.php1,424 ▲334.24 ▼0.0696.63 ▼4.7743.04 ▲0.35
Login Widget Settings /wp-admin/admin.php?page=login_widget_ap1,8232.1127.2534.27
Login Logs /wp-admin/admin.php?page=login_log_ap9372.0828.1825.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_login_log
  • Zombie WordPress options were found after uninstall: 11 options
    • new_password_mail_subject
    • widget_recent-posts
    • forgot_password_link_mail_body
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_login_wid
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • new_password_mail_body
    • ...

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
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=login_log_ap
    • > Notice in wp-content/plugins/login-sidebar-widget/includes/class-login-log.php+19
    Undefined index: paged
    • > GET request to /wp-admin/admin.php?page=login_log_ap
    • > Notice in wp-content/plugins/login-sidebar-widget/view/admin/login-log.php+31
    Undefined variable: cnt

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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/login-sidebar-widget/view/admin/social-login-add.php
    • > /wp-content/plugins/login-sidebar-widget/view/admin/register-pro-add.php
    • > /wp-content/plugins/login-sidebar-widget/view/admin/login-pro-add.php
    • > /wp-content/plugins/login-sidebar-widget/captcha/captcha.php
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/login-sidebar-widget/view/frontend/forgot-password.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/login-sidebar-widget/view/admin/login-log.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/login-sidebar-widget/view/admin/settings.php:1
    • > PHP Notice
      Undefined variable: link_with_username in wp-content/plugins/login-sidebar-widget/view/frontend/after-login.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/login-sidebar-widget/login.php:29
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/login-sidebar-widget/login.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/login-sidebar-widget/view/admin/captcha.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/login-sidebar-widget/view/admin/recaptcha.php:2
    • > PHP Notice
      Undefined variable: wid_id in wp-content/plugins/login-sidebar-widget/view/frontend/login.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/login-sidebar-widget/view/frontend/recaptcha.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
The official readme.txt might help

login-sidebar-widget/login.php 92% from 13 tests

The principal PHP file in "Login Widget With Shortcode" v. 6.1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("login-sidebar-widget.php" instead of "login.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin3,267 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP353052581,804
JavaScript4130394657
PO File2022172606
CSS295176
XML10024

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods71
▷ Static methods1521.13%
▷ Public methods6692.96%
▷ Protected methods00.00%
▷ Private methods57.04%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants5
▷ Global constants5100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rss.png0.60KB0.50KB▼ 16.18%
images/paypal.png0.77KB0.80KB0.00%
images/close.png0.42KB0.29KB▼ 30.28%