84% elvanto-login-widget

Code Review | Elvanto Login Widget

WordPress plugin Elvanto Login Widget scored84%from 54 tests.

About plugin

  • Plugin page: elvanto-login-widget
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6.0
  • WordPress version: 6.3.1
  • First release: Aug 17, 2015
  • Latest release: Nov 24, 2020
  • Number of updates: 18
  • Update frequency: every 107.6 days
  • Top authors: elvanto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,877 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼3.10ms] Passed 4 tests

A check of server-side resources used by Elvanto Login Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.34 ▼1.78
Dashboard /wp-admin3.31 ▲0.0144.22 ▼4.90
Posts /wp-admin/edit.php3.36 ▲0.0144.52 ▼2.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.24 ▼3.21
Media Library /wp-admin/upload.php3.24 ▲0.0135.89 ▼1.16

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_elvanto_login_widget
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Elvanto Login Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.341.56 ▼0.3438.79 ▼10.79
Dashboard /wp-admin2,206 ▲155.82 ▲0.9697.54 ▼1.2840.15 ▼5.32
Posts /wp-admin/edit.php2,092 ▼02.04 ▼0.0135.97 ▲1.7732.30 ▲1.19
Add New Post /wp-admin/post-new.php1,537 ▲1823.55 ▲0.19665.37 ▼8.1452.47 ▼9.78
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.04100.52 ▼6.2344.67 ▼2.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_elvanto_login_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/elvanto-login-widget/trunk/elvanto-login.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/elvanto-login-widget/elvanto-login.php:12

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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === elvanto-login-widget === )
The official readme.txt might help

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

The main file in "Elvanto Login Widget" v. 1.2 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: It is recommended to name the main PHP file as the plugin slug ("elvanto-login-widget.php" instead of "elvanto-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
Good job! No executable or dangerous file extensions detected67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191367

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin