84% minimum-length-for-contact-form-7

Code Review | Contact Form 7 minlength extension

WordPress plugin Contact Form 7 minlength extension scored 84% from 54 tests.

About plugin

  • Plugin page: minimum-length-fo...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: May 21, 2012
  • Latest release: Jun 26, 2017
  • Number of updates: 32
  • Update frequency: every 112.4 days
  • Top authors: Tussendoor (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active / 10,709 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.20ms] Passed 4 tests

Server-side resources used by Contact Form 7 minlength extension
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.01 ▲0.79
Dashboard /wp-admin3.32 ▲0.0245.19 ▲0.91
Posts /wp-admin/edit.php3.37 ▲0.0242.72 ▼5.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.33 ▲0.27
Media Library /wp-admin/upload.php3.24 ▲0.0234.91 ▼0.14

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 minlength extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼1113.27 ▼0.011.87 ▼2.5842.49 ▲2.75
Dashboard /wp-admin2,209 ▲65.86 ▲0.0895.54 ▼1.9036.01 ▼1.91
Posts /wp-admin/edit.php2,089 ▲32.02 ▲0.0136.73 ▼3.0134.27 ▼2.31
Add New Post /wp-admin/post-new.php1,514 ▼1917.77 ▼5.46713.97 ▲39.3662.84 ▲8.73
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.01103.27 ▲3.6245.80 ▲2.35

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minimum-length-for-contact-form-7/wpcf7_min_text.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minimum-length-for-contact-form-7/wpcf7_min_text.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minimum-length-for-contact-form-7/wpcf7_min_textarea.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Add minimum length to a textfield), #2 (Change the error notice), #3 (Show error notice like normal contact form 7 notices)
You can take inspiration from this readme.txt

minimum-length-for-contact-form-7/wpcf7_min_length.php 92% from 13 tests

The primary PHP file in "Contact Form 7 minlength extension" version 1.4.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("minimum-length-for-contact-form-7.php" instead of "wpcf7_min_length.php")

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
Success! There were no dangerous files found in this plugin249 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36513249

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.31MB with 0.20MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png107.90KB33.71KB▼ 68.76%
screenshot-1.png165.76KB54.75KB▼ 66.97%
screenshot-3.png38.70KB14.97KB▼ 61.31%