84% passwordless-login

Code Review | Passwordless Login

WordPress plugin Passwordless Login scored 84% from 54 tests.

About plugin

  • Plugin page: passwordless-login
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 31, 2014
  • Latest release: Jul 25, 2022
  • Number of updates: 38
  • Update frequency: every 74.3 days
  • Top authors: sareiodata (81.58%)madalin.ungureanu (21.05%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 21,326 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.39ms] Passed 4 tests

An overview of server-side resources used by Passwordless Login
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.94 ▼4.49
Dashboard /wp-admin3.39 ▲0.0846.29 ▼4.69
Posts /wp-admin/edit.php3.50 ▲0.1443.98 ▼9.37
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.97 ▼10.99
Media Library /wp-admin/upload.php3.31 ▲0.0833.40 ▲2.01
Passwordless Login /wp-admin/users.php?page=passwordless-login3.3532.51

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Passwordless Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲8313.29 ▼1.494.70 ▲2.6739.28 ▼5.02
Dashboard /wp-admin2,216 ▲315.79 ▼0.05106.96 ▲6.5240.95 ▼0.85
Posts /wp-admin/edit.php2,101 ▲122.05 ▲0.0833.80 ▼6.3333.44 ▲2.29
Add New Post /wp-admin/post-new.php1,547 ▲2723.55 ▲0.32674.04 ▲67.1856.62 ▲7.09
Media Library /wp-admin/upload.php1,401 ▲134.27 ▲0.1095.45 ▼1.4441.83 ▲0.32
Passwordless Login /wp-admin/users.php?page=passwordless-login8712.1424.1062.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/passwordless-login/passwordless_login.php:38
    • > 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/passwordless-login/passwordless_login.php on line 38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
7 plugin tags: passwordless login, login shortcode, passwordless authentication, custom login form, front-end login...

passwordless-login/passwordless_login.php 92% from 13 tests

"Passwordless Login" version 1.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("passwordless-login.php" instead of "passwordless_login.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin677 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS26915386
PHP277145291

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.67
▷ Minimum method complexity3.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/logo_150_150.png2.62KB2.00KB▼ 23.85%