83% tt-sidebar-login-widget

Code Review | Sidebar Login Widget

WordPress plugin Sidebar Login Widget scored83%from 54 tests.

About plugin

  • Plugin page: tt-sidebar-login-...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: Sep 8, 2014
  • Number of updates: 40
  • Update frequency: every 10.6 days
  • Top authors: rashed.latif (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /47,839 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.10ms] Passed 4 tests

This is a short check of server-side resources used by Sidebar Login Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.00 ▼6.65
Dashboard /wp-admin3.32 ▲0.0147.03 ▼2.71
Posts /wp-admin/edit.php3.37 ▲0.0144.21 ▼1.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.63 ▼9.46
Media Library /wp-admin/upload.php3.24 ▲0.0133.23 ▲1.59

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_sidebarlogin
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Sidebar Login Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.19 ▼0.241.76 ▲0.0944.30 ▲0.52
Dashboard /wp-admin2,200 ▲235.65 ▲0.0996.56 ▼3.3942.42 ▼0.43
Posts /wp-admin/edit.php2,105 ▲22.04 ▲0.0135.02 ▼2.0130.90 ▼6.49
Add New Post /wp-admin/post-new.php1,529 ▲123.12 ▼0.05647.95 ▼4.5255.04 ▲0.53
Media Library /wp-admin/upload.php1,405 ▲54.23 ▲0.0094.21 ▼2.3442.21 ▼2.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_sidebarlogin

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tt-sidebar-login-widget/tt-sidebar-login.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === tt-sidebar-login-widget === )
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

tt-sidebar-login-widget/tt-sidebar-login.php 85% from 13 tests

The main PHP file in "Sidebar Login Widget" ver. 2.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tt-sidebar-login-widget.php" instead of "tt-sidebar-login.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0" instead of "3.0.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected938 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File9216216586
PHP15933247
CSS1100105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png6.31KB3.17KB▼ 49.81%
assets/screenshot-3.png6.21KB3.77KB▼ 39.29%
assets/screenshot-2.png12.72KB7.44KB▼ 41.46%