10% sms-alert-for-contact-form-7

Code Review | SMS Alert for Contact Form 7

WordPress plugin SMS Alert for Contact Form 7 scored10%from 54 tests.

About plugin

  • Plugin page: sms-alert-for-con...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.1.1
  • WordPress version: 6.3.1
  • First release: May 6, 2019
  • Latest release: May 7, 2019
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: informerfrk (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,434 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-admin/options.php+235
    Undefined variable: action

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.07ms] Passed 4 tests

An overview of server-side resources used by SMS Alert for Contact Form 7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.57 ▲2.00
Dashboard /wp-admin3.31 ▲0.0049.61 ▼3.56
Posts /wp-admin/edit.php3.36 ▲0.0045.17 ▼6.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.76 ▼21.54
Media Library /wp-admin/upload.php3.23 ▲0.0037.29 ▼0.92

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

SMS Alert for Contact Form 7: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.67 ▲0.481.64 ▼0.1339.03 ▼9.50
Dashboard /wp-admin2,198 ▲185.58 ▼0.0994.52 ▲1.1241.87 ▼1.81
Posts /wp-admin/edit.php2,103 ▼01.99 ▼0.0238.61 ▼0.3934.03 ▼2.52
Add New Post /wp-admin/post-new.php1,528 ▼023.09 ▼0.08686.48 ▲66.8759.10 ▲7.29
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.03111.51 ▲2.5348.02 ▲2.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sms-alert-for-contact-form-7/sms_alert.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sms-alert-for-contact-form-7/options/txtlcl_options.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sms-alert-for-contact-form-7/send_sms/twilio.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sms-alert-for-contact-form-7/send_sms/txtlcl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sms-alert-for-contact-form-7/options/nexmo_options.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sms-alert-for-contact-form-7/options/msg91_options.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sms-alert-for-contact-form-7/options/twilio_options.php:17
    • > PHP Notice
      Undefined variable: smsapi in wp-content/plugins/sms-alert-for-contact-form-7/options/nexmo_options.php on line 3
    • > PHP Notice
      Undefined variable: smsapi in wp-content/plugins/sms-alert-for-contact-form-7/options/msg91_options.php on line 3
    • > PHP Notice
      Undefined variable: smsapi in wp-content/plugins/sms-alert-for-contact-form-7/options/twilio_options.php on line 3

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can take inspiration from this readme.txt

sms-alert-for-contact-form-7/sms_alert.php 92% from 13 tests

The principal PHP file in "SMS Alert for Contact Form 7" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sms-alert-for-contact-form-7.php" instead of "sms_alert.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin697 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1120297459
CSS24360205
JavaScript1151133

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions21
▷ Named functions1361.90%
▷ Anonymous functions838.10%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/twilio.png8.60KB5.79KB▼ 32.65%