84% custom-validation-error-message-cf7

Code Review | Custom validation error message - CF7

WordPress plugin Custom validation error message - CF7 scored84%from 54 tests.

About plugin

  • Plugin page: custom-validation...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-6.0
  • WordPress version: 6.3.1
  • First release: Oct 7, 2020
  • Latest release: Jun 14, 2022
  • Number of updates: 4
  • Update frequency: every 154.0 days
  • Top authors: brainvireinfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,104 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Custom validation error message - CF7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0841.10 ▼5.23
Dashboard /wp-admin3.38 ▲0.0847.25 ▼7.48
Posts /wp-admin/edit.php3.43 ▲0.0849.59 ▼3.79
Add New Post /wp-admin/post-new.php5.96 ▲0.0883.53 ▼10.88
Media Library /wp-admin/upload.php3.30 ▲0.0837.66 ▼2.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom validation error message - CF7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.35 ▼0.231.88 ▲0.0745.72 ▲2.35
Dashboard /wp-admin2,198 ▲275.63 ▲0.0592.42 ▼9.1438.22 ▼8.84
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0039.02 ▲1.7035.48 ▲1.96
Add New Post /wp-admin/post-new.php1,526 ▼1723.14 ▲2.03669.35 ▼29.4160.82 ▲4.88
Media Library /wp-admin/upload.php1,400 ▼04.31 ▲0.1796.63 ▼20.5644.90 ▼4.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/custom-validation-error-message-cf7/cf7-custom-validation-error-message.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: contact form field, validation message, contact form, custom validation, cf7 custom validation message...

custom-validation-error-message-cf7/cf7-custom-validation-error-message.php 92% from 13 tests

The primary PHP file in "Custom validation error message - CF7" version 1.0.0 is used by WordPress to initiate all plugin functionality
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 ("custom-validation-error-message-cf7.php" instead of "cf7-custom-validation-error-message.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin188 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25733188

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code1.07
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%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin