83% email-otp-authenticator

Code Review | Email OTP Authenticator

WordPress plugin Email OTP Authenticator scored83%from 54 tests.

About plugin

  • Plugin page: email-otp-authent...
  • Plugin version: 2.7.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 8, 2023
  • Latest release: Nov 25, 2023
  • Number of updates: 18
  • Update frequency: every 9.5 days
  • Top authors: ilvchandan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /774 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Email OTP Authenticator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.75 ▲1.10
Dashboard /wp-admin3.39 ▲0.0544.75 ▼8.46
Posts /wp-admin/edit.php3.51 ▲0.1547.60 ▲3.71
Add New Post /wp-admin/post-new.php5.97 ▲0.0990.87 ▼3.21
Media Library /wp-admin/upload.php3.32 ▲0.0933.94 ▲2.84
Email OTP Authn /wp-admin/options-general.php?page=email-otp-authenticator3.3534.03

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Email OTP Authenticator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7214.02 ▼0.381.76 ▲0.1136.76 ▼2.05
Dashboard /wp-admin2,216 ▲355.61 ▼0.0792.11 ▼14.3442.08 ▲3.20
Posts /wp-admin/edit.php2,115 ▲151.98 ▼0.0440.65 ▲5.0435.65 ▲1.65
Add New Post /wp-admin/post-new.php1,537 ▲1123.13 ▼0.06611.52 ▼6.6259.56 ▲9.99
Media Library /wp-admin/upload.php1,421 ▲184.19 ▲0.0198.20 ▲3.2242.29 ▼0.59
Email OTP Authn /wp-admin/options-general.php?page=email-otp-authenticator1,3822.0126.9157.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/email-otp-authenticator/lib/upgrade.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/email-otp-authenticator/lib/settings.php:22

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 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

email-otp-authenticator/email-otp-authenticator.php 85% from 13 tests

This is the main PHP file of "Email OTP Authenticator" version 2.7.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.6" instead of "5.6.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)

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
Success! There were no dangerous files found in this plugin758 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP637133758

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity27.00
▷ Minimum class complexity15.00
▷ Maximum class complexity39.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin