71% contact-form-sms-notifications

Code Review | Contact Form SMS Notifications

WordPress plugin Contact Form SMS Notifications scored71%from 54 tests.

About plugin

  • Plugin page: contact-form-sms-...
  • Plugin version: 1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 21, 2020
  • Latest release: Jul 22, 2023
  • Number of updates: 5
  • Update frequency: every 237.6 days
  • Top authors: piyushmca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /537 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.96ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form SMS Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.68 ▲4.58
Dashboard /wp-admin3.34 ▲0.0456.33 ▼7.60
Posts /wp-admin/edit.php3.45 ▲0.1053.35 ▲2.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.64 ▼10.13
Media Library /wp-admin/upload.php3.26 ▲0.0441.27 ▲3.70
/wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page3.28449.43
Sms Integration /wp-admin/admin.php?page=cf7isi-options3.2634.00

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Contact Form SMS Notifications: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.431.78 ▼0.2644.50 ▲1.05
Dashboard /wp-admin2,206 ▲215.91 ▲0.1097.93 ▼14.1340.51 ▼0.96
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0341.07 ▲2.5437.95 ▲2.64
Add New Post /wp-admin/post-new.php1,533 ▲1923.30 ▲5.87684.77 ▼3.4157.58 ▲4.96
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.0497.47 ▼20.0943.03 ▼3.64
/wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page1,0073.82111.3745.40
Sms Integration /wp-admin/admin.php?page=cf7isi-options8902.1826.4426.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/contact-form-sms-notifications/template/cf7-conf-footer.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/contact-form-sms-notifications/template/welcome-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/contact-form-sms-notifications/template/cf7-template.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/contact-form-sms-notifications/admin/class-table-listing.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-form-sms-notifications/admin/class-table-listing.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/contact-form-sms-notifications/template/cf7-conf-header.php:5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/contact-form-sms-notifications/admin/class-table-listing.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/contact-form-sms-notifications/template/cf7-settings.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page
    • > Javascript (severe) in unknown
    http://s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js 194:13 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots require images: #1 (You can Create your custome SMS template and Get SMS in your Mobile Using Contact Form 7 Plugin. For SMS API [Buy Bulk SMS](https://www.allbulksms.in/)), #2 (All Bulk SMS API Settings.)
The official readme.txt is a good inspiration

contact-form-sms-notifications/index.php 77% from 13 tests

The principal PHP file in "Contact Form SMS Notifications" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contact-form-sms-notifications.php" instead of "index.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected833 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1215789798
JavaScript12035

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.67
▷ Minimum class complexity3.00
▷ Maximum class complexity26.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods61
▷ Static methods11.64%
▷ Public methods5285.25%
▷ Protected methods34.92%
▷ Private methods69.84%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png74.43KB25.12KB▼ 66.25%
screenshot-1.png131.68KB48.72KB▼ 63.00%