84% otp-login

Code Review | Login With OTP

WordPress plugin Login With OTP scored84%from 54 tests.

About plugin

  • Plugin page: otp-login
  • Plugin version: 1.4.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Jun 12, 2020
  • Latest release: Nov 8, 2023
  • Number of updates: 25
  • Update frequency: every 49.8 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,300 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.32ms] Passed 4 tests

An overview of server-side resources used by Login With OTP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.89 ▼3.14
Dashboard /wp-admin3.37 ▲0.0352.85 ▼13.38
Posts /wp-admin/edit.php3.42 ▲0.0749.41 ▲2.64
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.14 ▼7.24
Media Library /wp-admin/upload.php3.30 ▲0.0737.25 ▲2.47
OTP Login /wp-admin/options-general.php?page=otp-login3.2727.66

Server storage [IO: ▲0.06MB] [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: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Login With OTP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7213.15 ▼1.134.20 ▲2.5437.93 ▼4.64
Dashboard /wp-admin2,216 ▲385.66 ▼0.0496.62 ▼5.3342.94 ▲3.06
Posts /wp-admin/edit.php2,118 ▲181.94 ▼0.0039.81 ▼1.7736.73 ▼0.14
Add New Post /wp-admin/post-new.php1,537 ▲1123.46 ▼0.31696.25 ▲3.8058.79 ▲0.27
Media Library /wp-admin/upload.php1,412 ▲124.29 ▲0.13101.13 ▲0.6244.03 ▼0.41
OTP Login /wp-admin/options-general.php?page=otp-login1,0222.0227.7353.04

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/otp-login/lib/settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: register, login, otp login, otp, mobile otp login...

otp-login/otp-login.php 92% from 13 tests

The principal PHP file in "Login With OTP" v. 1.4.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 246 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected419 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP460102407
JavaScript10111
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity13.50
▷ Minimum class complexity4.00
▷ Maximum class complexity23.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin