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

Code Review | Data8 Validation

WordPress plugin Data8 Validation scored78%from 54 tests.

About plugin

  • Plugin page: data8-validation-...
  • Plugin version: 3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.3-6.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2016
  • Latest release: Feb 3, 2023
  • Number of updates: 48
  • Update frequency: every 47.8 days
  • Top authors: data8 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /8,571 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▲0.49ms] Passed 4 tests

A check of server-side resources used by Data8 Validation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2544.14 ▲3.66
Dashboard /wp-admin3.54 ▲0.2343.79 ▼5.56
Posts /wp-admin/edit.php3.65 ▲0.2950.02 ▲9.49
Add New Post /wp-admin/post-new.php6.12 ▲0.2386.65 ▼2.12
Media Library /wp-admin/upload.php3.46 ▲0.2339.23 ▲5.96

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Data8 Validation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲6613.20 ▼1.494.79 ▲2.7143.00 ▼2.99
Dashboard /wp-admin2,215 ▲245.77 ▼0.1297.94 ▼7.2039.95 ▲2.92
Posts /wp-admin/edit.php2,104 ▲152.01 ▼0.0341.17 ▲3.3034.95 ▲1.35
Add New Post /wp-admin/post-new.php1,543 ▲123.09 ▲4.53647.08 ▲35.0861.43 ▲12.63
Media Library /wp-admin/upload.php1,403 ▲124.18 ▼0.0296.75 ▼4.0842.22 ▼0.63

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

Smoke tests 50% 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 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/data8-validation-for-contact-form-7/includes/d8cf7_header.php
    • > /wp-content/plugins/data8-validation-for-contact-form-7/includes/d8cf7_instructions.php
    • > /wp-content/plugins/data8-validation-for-contact-form-7/includes/d8cf7_footer.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/data8-validation-for-contact-form-7/data8-validation-for-contact-form-7.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/data8-validation-for-contact-form-7/includes/d8wc-validation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/data8-validation-for-contact-form-7/includes/d8wpf-validation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/data8-validation-for-contact-form-7/includes/d8cf7-validation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/data8-validation-for-contact-form-7/includes/d8gf-validation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/data8-validation-for-contact-form-7/plugin_interface.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/data8-validation-for-contact-form-7/includes/d8cf7_settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/data8-validation-for-contact-form-7/includes/d8ep-validation.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (31 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

data8-validation-for-contact-form-7/data8-validation-for-contact-form-7.php 85% from 13 tests

The primary PHP file in "Data8 Validation" version 3.7 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "2.2.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected2,075 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP11345832,075

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions38
▷ Named functions38100.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
PNG images were not found in this plugin