77% miniorange-firebase-sms-otp-verification

Code Review | Miniorange OTP Verification with Firebase

WordPress plugin Miniorange OTP Verification with Firebase scored77%from 54 tests.

About plugin

  • Plugin page: miniorange-fireba...
  • Plugin version: 3.4.0
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 30, 2022
  • Latest release: Nov 22, 2023
  • Number of updates: 21
  • Update frequency: every 24.3 days
  • Top authors: shrikantniras (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,762 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.11MB] [CPU: ▼2.40ms] Passed 4 tests

A check of server-side resources used by Miniorange OTP Verification with Firebase
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1538.76 ▼1.88
Dashboard /wp-admin3.45 ▲0.1449.96 ▼5.21
Posts /wp-admin/edit.php3.50 ▲0.1448.65 ▼3.56
Add New Post /wp-admin/post-new.php5.98 ▲0.1095.50 ▲1.05
Media Library /wp-admin/upload.php3.31 ▲0.0836.18 ▲3.97
Licensing Plans /wp-admin/admin.php?page=mofrotplicense3.3436.10
Setup Account /wp-admin/admin.php?page=mofrotpaccount3.3339.03
Form Settings /wp-admin/admin.php?page=registrationform3.6747.81
Gateway Settings /wp-admin/admin.php?page=mofrgatewayconfig3.3335.27

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 154 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Miniorange OTP Verification with Firebase
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲17114.34 ▲0.091.75 ▼0.0938.03 ▼5.56
Dashboard /wp-admin2,323 ▲1465.86 ▲0.3396.07 ▼4.3090.68 ▲42.66
Posts /wp-admin/edit.php2,243 ▲1432.06 ▲0.0643.62 ▼0.2636.48 ▲1.89
Add New Post /wp-admin/post-new.php1,816 ▲28022.53 ▼0.45710.60 ▲86.3042.45 ▼11.55
Media Library /wp-admin/upload.php1,543 ▲1434.22 ▲0.02113.32 ▲16.1846.21 ▲4.88
Licensing Plans /wp-admin/admin.php?page=mofrotplicense1,4992.1430.26101.91
Setup Account /wp-admin/admin.php?page=mofrotpaccount1,2831.7130.5044.26
Form Settings /wp-admin/admin.php?page=registrationform2,8411.7734.82119.38
Gateway Settings /wp-admin/admin.php?page=mofrgatewayconfig1,4042.1430.0341.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'MoOTP\\Helper\\MoUtility' not found in wp-content/plugins/miniorange-firebase-sms-otp-verification/controllers/user-side-controller.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/miniorange-firebase-sms-otp-verification/views/user-side-controller.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mofrgatewayconfig
    • > Network (severe)
    wp-content/plugins/miniorange-firebase-sms-otp-verification/includes/css/mo_fr_otp_boot.min.css?version=3.4.0&ver=3.4.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Login and Signup Form), #2 (Enable OTP verification on Login Form), #3 (Enable OTP verification on Registration Form), #4 (miniOrange Login with Email and Password Form), #5 (miniOrange Registration Form), #6 (miniOrange Login with Phone Number and OTP Form)
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt is a good inspiration

miniorange-firebase-sms-otp-verification/miniorange_firebase_validation_initializer.php 77% from 13 tests

"Miniorange OTP Verification with Firebase" version 3.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("miniorange-firebase-sms-otp-verification.php" instead of "miniorange_firebase_validation_initializer.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("3.5" instead of "2.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin14,385 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
PO File43,1214,8077,819
PHP617731,7366,256
SVG2620295
JavaScript9029
CSS6006

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.69
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces6
Interfaces3
Traits1
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes832.00%
Methods161
▷ Static methods5735.40%
▷ Public methods12577.64%
▷ Protected methods74.35%
▷ Private methods2918.01%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants169
▷ Global constants3218.93%
▷ Class constants13781.07%
▷ Public constants137100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
22 PNG files occupy 0.43MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/mo_aws_sns.png6.45KB2.96KB▼ 54.17%
includes/images/licensing.png0.65KB0.40KB▼ 38.31%
includes/images/mo_support_icon.png2.74KB1.64KB▼ 40.33%
includes/images/mo_firebase.png3.22KB1.94KB▼ 39.72%
includes/images/miniorange_icon.png0.44KB0.35KB▼ 18.61%