84% login-with-username-or-email

Code Review | Login with Username or Email

WordPress plugin Login with Username or Email scored 84% from 54 tests.

About plugin

  • Plugin page: login-with-userna...
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Mar 14, 2016
  • Number of updates: 64
  • Update frequency: every 2.9 days
  • Top authors: rizwanchaudhry (70.31%)BCSWPplugins (31.25%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 5,463 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Login with Username or Email
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.37 ▼5.47
Dashboard /wp-admin3.31 ▲0.0152.34 ▲5.03
Posts /wp-admin/edit.php3.36 ▲0.0149.36 ▼0.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.33 ▲7.74
Media Library /wp-admin/upload.php3.23 ▲0.0136.22 ▲4.30

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

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

Browser metrics Passed 4 tests

Login with Username or Email: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.18 ▼1.201.58 ▼0.2336.07 ▼9.09
Dashboard /wp-admin2,228 ▲405.88 ▲0.01108.52 ▲0.1971.63 ▲29.05
Posts /wp-admin/edit.php2,114 ▲222.11 ▲0.0938.27 ▼2.3533.83 ▼3.69
Add New Post /wp-admin/post-new.php1,554 ▲3718.39 ▲0.90642.75 ▲59.6466.25 ▲10.41
Media Library /wp-admin/upload.php1,413 ▲254.26 ▲0.0196.50 ▼1.1981.09 ▲39.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/login-with-username-or-email/email_login.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: login with email or username, username, login with email address, logging in with email, login...

login-with-username-or-email/email_login.php 92% from 13 tests

The main file in "Login with Username or Email" v. 2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("login-with-username-or-email.php" instead of "email_login.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1303470
HTML1109

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png26.42KB6.38KB▼ 75.87%
assets/screenshot-2.png27.83KB7.48KB▼ 73.13%