84% contact-form-7-hide-success-message

Code Review | Contact Form - 7 : Hide Success Message

WordPress plugin Contact Form - 7 : Hide Success Message scored 84% from 54 tests.

About plugin

  • Plugin page: contact-form-7-hi...
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2015
  • Latest release: May 26, 2016
  • Number of updates: 19
  • Update frequency: every 22.4 days
  • Top authors: rohilmistry (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 11,021 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.21ms] Passed 4 tests

A check of server-side resources used by Contact Form - 7 : Hide Success Message
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.37 ▼2.72
Dashboard /wp-admin3.31 ▲0.0150.28 ▼0.33
Posts /wp-admin/edit.php3.36 ▲0.0146.22 ▼4.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.70 ▼17.38
Media Library /wp-admin/upload.php3.24 ▲0.0135.53 ▲0.86

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
cf7_hide_success_msg_activated

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form - 7 : Hide Success Message
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.73 ▼0.652.08 ▲0.2844.32 ▼7.96
Dashboard /wp-admin2,217 ▲654.86 ▼0.76106.16 ▲10.3841.19 ▼1.34
Posts /wp-admin/edit.php2,096 ▲72.07 ▲0.0733.06 ▼11.3633.63 ▼4.06
Add New Post /wp-admin/post-new.php1,536 ▼022.92 ▼0.57591.43 ▼55.2054.93 ▲4.26
Media Library /wp-admin/upload.php1,396 ▲144.28 ▲0.1195.24 ▼2.8041.43 ▼3.02

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/contact-form-7-hide-success-message/cf7_hide_success_message.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (18 tag instead of maximum 10)
You can take inspiration from this readme.txt

contact-form-7-hide-success-message/cf7_hide_success_message.php 92% from 13 tests

"Contact Form - 7 : Hide Success Message" version 1.1.4'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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("contact-form-7-hide-success-message.php" instead of "cf7_hide_success_message.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin244 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24848190
JavaScript212940
CSS12014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
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
No PNG files were detected