83% cf7-otp-sms-verification

Code Review | Contact Form 7 OTP SMS Verification

WordPress plugin Contact Form 7 OTP SMS Verification scored 83% from 54 tests.

About plugin

  • Plugin page: cf7-otp-sms-verif...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.3
  • WordPress version: 6.3.1
  • First release: Jun 14, 2019
  • Latest release: Sep 10, 2019
  • Number of updates: 4
  • Update frequency: every 22.5 days
  • Top authors: witsolution1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.27ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 OTP SMS Verification
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.96 ▼5.29
Dashboard /wp-admin3.32 ▲0.0245.25 ▼0.91
Posts /wp-admin/edit.php3.37 ▲0.0248.94 ▼1.44
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.84 ▼9.42
Media Library /wp-admin/upload.php3.24 ▲0.0236.27 ▲2.23

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 OTP SMS Verification
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.52 ▼0.808.17 ▲6.4742.22 ▲0.56
Dashboard /wp-admin2,225 ▲374.87 ▼0.02103.14 ▼10.9938.91 ▼3.37
Posts /wp-admin/edit.php2,102 ▲101.99 ▼0.0039.10 ▼1.1235.51 ▲0.08
Add New Post /wp-admin/post-new.php1,546 ▲2723.59 ▲0.59672.84 ▲86.3653.83 ▲1.19
Media Library /wp-admin/upload.php1,404 ▲164.20 ▼0.0795.57 ▼1.5141.51 ▼5.95

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-otp-sms-verification/inc/admin-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/cf7-otp-sms-verification/custom-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/cf7-otp-sms-verification/custom-functions.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: otp varification in contact form 7, contact form 7 otp, contact form 7 mobile verification, abl otp sms verification

cf7-otp-sms-verification/abl-sms-otp-verification.php 77% from 13 tests

"Contact Form 7 OTP SMS Verification" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cf7-otp-sms-verification.php" instead of "abl-sms-otp-verification.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin791 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43488368
PHP33981249
CSS2266174

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.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin