72% usmsgh-contact-form-7-sms-notification

Code Review | USMS-GH Contact Form 7 SMS Notification

WordPress plugin USMS-GH Contact Form 7 SMS Notification scored72%from 54 tests.

About plugin

  • Plugin page: usmsgh-contact-fo...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2021
  • Latest release: Oct 31, 2023
  • Number of updates: 24
  • Update frequency: every 31.6 days
  • Top authors: urhitech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /576 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.55ms] Passed 4 tests

Analyzing server-side resources used by USMS-GH Contact Form 7 SMS Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.08 ▲0.57
Dashboard /wp-admin3.35 ▲0.0446.74 ▼3.64
Posts /wp-admin/edit.php3.46 ▲0.1149.46 ▼1.47
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.24 ▼0.41
Media Library /wp-admin/upload.php3.27 ▲0.0442.97 ▼4.68
/wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page3.29334.03
Sms Integration /wp-admin/admin.php?page=cf7isi-options3.2731.26

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

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

Browser metrics Passed 4 tests

A check of browser resources used by USMS-GH Contact Form 7 SMS Notification
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.35 ▲0.101.61 ▼0.2648.15 ▲5.88
Dashboard /wp-admin2,203 ▲235.65 ▼0.0193.83 ▲5.8738.52 ▲0.05
Posts /wp-admin/edit.php2,108 ▲82.05 ▲0.0642.60 ▼1.2835.35 ▼4.96
Add New Post /wp-admin/post-new.php1,532 ▲622.79 ▼0.83728.07 ▼70.7852.40 ▼11.18
Media Library /wp-admin/upload.php1,405 ▲114.22 ▲0.08114.11 ▼55.7748.42 ▼23.92
/wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page9344.3596.7543.05
Sms Integration /wp-admin/admin.php?page=cf7isi-options9042.9038.6323.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/usmsgh-contact-form-7-sms-notification/template/cf7-conf-footer.php
  • 7× PHP files trigger server errors when accessed directly:
    • > 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/usmsgh-contact-form-7-sms-notification/admin/class-table-listing.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/usmsgh-contact-form-7-sms-notification/template/cf7-conf-header.php:5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/usmsgh-contact-form-7-sms-notification/admin/class-table-listing.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/usmsgh-contact-form-7-sms-notification/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/usmsgh-contact-form-7-sms-notification/admin/class-table-listing.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/usmsgh-contact-form-7-sms-notification/template/welcome-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/usmsgh-contact-form-7-sms-notification/template/cf7-settings.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page
    • > Javascript (severe) in unknown
    /wp-admin/js/common.min.js?ver=6.3.1 1:21 Uncaught TypeError: W is not a function
    • > GET request to /wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page
    • > Javascript (severe) in unknown
    /wp-admin/js/svg-painter.js?ver=6.3.1 14:1 Uncaught TypeError: $ is not a function
    • > GET request to /wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page
    • > Javascript (severe) in unknown
    /wp-includes/js/heartbeat.min.js?ver=6.3.1 1:73 Uncaught TypeError: f is not a function
    • > GET request to /wp-admin/index.php?page=cf7-sms-integration-abs-welcome-page
    • > Javascript (severe) in unknown
    /wp-includes/js/wp-auth-check.min.js?ver=6.3.1 1:331 Uncaught TypeError: i is not a function

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

usmsgh-contact-form-7-sms-notification/index.php 77% from 13 tests

This is the main PHP file of "USMS-GH Contact Form 7 SMS Notification" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("usmsgh-contact-form-7-sms-notification.php" instead of "index.php")
  • Git Repository: An alternative Git repository was detected
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected4,674 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript588862,614
PHP244664971,787
XML600119
JSON30080
Markdown129073
CSS1061

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.92
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods133
▷ Static methods1712.78%
▷ Public methods11989.47%
▷ Protected methods32.26%
▷ Private methods118.27%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.44MB with 0.32MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png157.00KB53.29KB▼ 66.06%
screenshot-1.png104.84KB25.69KB▼ 75.50%
screenshot-2.png192.06KB51.67KB▼ 73.10%