78% jquery-validation-for-contact-form-7

Code Review | Jquery Validation For Contact Form 7

WordPress plugin Jquery Validation For Contact Form 7 scored78%from 54 tests.

About plugin

  • Plugin page: jquery-validation...
  • Plugin version: 5.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: May 24, 2012
  • Latest release: Sep 12, 2023
  • Number of updates: 42
  • Update frequency: every 98.3 days
  • Top authors: dnesscarkey (100%)

Code review

54 tests

User reviews

87 reviews

Install metrics

10,000+ active /205,200 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.59ms] Passed 4 tests

This is a short check of server-side resources used by Jquery Validation For Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.19 ▼0.91
Dashboard /wp-admin3.33 ▲0.0348.84 ▲3.24
Posts /wp-admin/edit.php3.38 ▲0.0245.17 ▲2.16
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.48 ▼5.04
Media Library /wp-admin/upload.php3.25 ▲0.0234.75 ▲1.43

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 10 new options
New WordPress options
jvcf7_show_label_error
widget_recent-posts
widget_recent-comments
jvcf7_invalid_field_design
widget_theysaidso_widget
jvcf7_current_version
jvcf7_install_date
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Jquery Validation For Contact Form 7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18714.18 ▼0.196.52 ▲4.9043.85 ▲2.25
Dashboard /wp-admin2,226 ▲445.08 ▼0.78111.99 ▲9.4040.78 ▼1.74
Posts /wp-admin/edit.php2,109 ▲202.07 ▲0.0638.91 ▲4.5434.70 ▼1.46
Add New Post /wp-admin/post-new.php1,532 ▲421.03 ▲2.98658.15 ▲30.0652.84 ▼2.17
Media Library /wp-admin/upload.php1,411 ▲264.28 ▲0.07102.03 ▲4.2941.96 ▼2.58

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
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_theysaidso_widget
    • jvcf7_install_date
    • can_compress_scripts
    • jvcf7_show_label_error
    • widget_recent-posts
    • jvcf7_current_version
    • widget_recent-comments
    • theysaidso_admin_options
    • jvcf7_invalid_field_design
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_pro_version.php
    • > /wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_main.php
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include(JVCF7_FILE_PATHincludes/views/jvcf7_sidebar.php): failed to open stream: No such file or directory in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_main.php on line 34
    • > PHP Notice
      Undefined variable: jvcf7_tabs in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_main.php on line 22
    • > PHP Warning
      include(): Failed opening 'JVCF7_FILE_PATHincludes/views/' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_main.php on line 31
    • > PHP Warning
      Use of undefined constant JVCF7_FILE_PATH - assumed 'JVCF7_FILE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_main.php on line 31
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_settings.php on line 16
    • > PHP Notice
      Undefined index: jvcf7_default_settings in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_settings.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_main.php on line 31
    • > PHP Notice
      Undefined variable: jvcf7_tabs in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_main.php on line 31
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_settings.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jquery-validation-for-contact-form-7/includes/views/jvcf7_settings.php on line 15

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Validation Error None (Lite Version)) image not found
Please take inspiration from this readme.txt

jquery-validation-for-contact-form-7/jquery-validation-for-contact-form-7.php Passed 13 tests

"Jquery Validation For Contact Form 7" version 5.4.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
58 characters long description:
This plugin integrates jquery validation in contact form 7

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin345 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP9508266
JavaScript26445
CSS24134

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 0.20MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png81.74KB28.80KB▼ 64.77%
includes/assets/img/error.png0.58KB0.52KB▼ 9.80%
includes/assets/img/valid.png0.44KB0.36KB▼ 18.67%
screenshot-5.png5.05KB3.65KB▼ 27.66%
screenshot-7.png5.00KB3.62KB▼ 27.59%