74% message-notification-for-contact-form-7

Code Review | Message Notification for Contact Form 7

WordPress plugin Message Notification for Contact Form 7 scored74%from 54 tests.

About plugin

  • Plugin page: message-notificat...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.3
  • WordPress version: 6.3.1
  • First release: May 17, 2022
  • Latest release: May 17, 2022
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: whatso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /352 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.97ms] Passed 4 tests

This is a short check of server-side resources used by Message Notification for Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.96 ▼13.29
Dashboard /wp-admin3.39 ▲0.0846.95 ▼1.42
Posts /wp-admin/edit.php3.50 ▲0.1445.98 ▼0.06
Add New Post /wp-admin/post-new.php5.97 ▲0.0880.73 ▼13.09
Media Library /wp-admin/upload.php3.31 ▲0.0834.83 ▲1.57

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: 1 new table, 6 new options
New tables
wp_message_notification_details
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Message Notification for Contact Form 7: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.18 ▼1.501.77 ▼0.9842.42 ▼22.54
Dashboard /wp-admin2,218 ▲274.88 ▼0.0094.26 ▼21.3766.96 ▲24.05
Posts /wp-admin/edit.php2,101 ▲121.98 ▼0.0339.06 ▲2.0730.44 ▼9.14
Add New Post /wp-admin/post-new.php1,521 ▼1623.18 ▲4.76660.51 ▼16.1958.50 ▲4.57
Media Library /wp-admin/upload.php1,400 ▲154.24 ▼0.04109.60 ▲10.7043.88 ▼0.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/message-notification-for-contact-form-7/admin/partials/message-notification-for-contact-form-7-admin-display.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/message-notification-for-contact-form-7/admin/partials/message-notification-for-contact-form-7-admin-setup.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/message-notification-for-contact-form-7/includes/class-message-notification-for-contact-form-7.php:386

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: cf7, contact form 7 notification, whatsapp notifications, contact form 7, whatso...

message-notification-for-contact-form-7/message-notification-for-contact-form-7.php Passed 13 tests

"Message Notification for Contact Form 7" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
84 characters long description:
This plugin provides admin Notification of feedback given by user on contact form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected879 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11213450761
CSS21229113
JavaScript32395

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.67
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods313.04%
▷ Public methods1982.61%
▷ Protected methods00.00%
▷ Private methods417.39%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/whatso-new-logo.png0.64KB0.62KB▼ 4.10%
admin/images/whatso-logo.png7.38KB3.02KB▼ 59.06%