83% getotp-otp-verification

Code Review | GetOTP OTP Verification

WordPress plugin GetOTP OTP Verification scored83%from 54 tests.

About plugin

  • Plugin page: getotp-otp-verifi...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jan 4, 2022
  • Latest release: Aug 1, 2022
  • Number of updates: 16
  • Update frequency: every 13.4 days
  • Top authors: lalokalabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /920 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.27MB] [CPU: ▼0.90ms] Passed 4 tests

This is a short check of server-side resources used by GetOTP OTP Verification
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2438.56 ▼5.52
Dashboard /wp-admin3.62 ▲0.3149.84 ▼5.56
Posts /wp-admin/edit.php3.67 ▲0.3157.54 ▲10.58
Add New Post /wp-admin/post-new.php6.15 ▲0.2792.91 ▲2.96
Media Library /wp-admin/upload.php3.48 ▲0.2540.76 ▲4.51

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for GetOTP OTP Verification
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14813.41 ▼0.987.87 ▲5.7141.20 ▼3.41
Dashboard /wp-admin2,230 ▲565.59 ▼0.0094.35 ▼6.1538.16 ▼3.70
Posts /wp-admin/edit.php2,137 ▲402.02 ▲0.0742.23 ▲5.7638.22 ▲3.49
Add New Post /wp-admin/post-new.php1,540 ▲1423.10 ▼0.23689.01 ▲23.4452.67 ▼2.15
Media Library /wp-admin/upload.php1,440 ▲374.20 ▼0.00106.26 ▲4.1345.91 ▲0.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/getotp-otp-verification/admin/partials/getotp-admin-display.php
    • > /wp-content/plugins/getotp-otp-verification/public/partials/getotp-public-display.php

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

getotp-otp-verification/getotp.php 85% from 13 tests

Analyzing the main PHP file in "GetOTP OTP Verification" version 1.4.1
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("getotp-otp-verification.php" instead of "getotp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,314 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP125047051,222
JavaScript7355692
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity28.29
▷ Minimum class complexity1.00
▷ Maximum class complexity137.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods82
▷ Static methods22.44%
▷ Public methods5364.63%
▷ Protected methods00.00%
▷ Private methods2935.37%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin