84% dob-field-for-cf7

Code Review | DOB Field For CF7

WordPress plugin DOB Field For CF7 scored84%from 54 tests.

About plugin

  • Plugin page: dob-field-for-cf7
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2022
  • Latest release: Jan 21, 2023
  • Number of updates: 5
  • Update frequency: every 8.8 days
  • Top authors: solaito (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /315 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.07MB] [CPU: ▼5.96ms] Passed 4 tests

An overview of server-side resources used by DOB Field For CF7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.58 ▼6.73
Dashboard /wp-admin3.38 ▲0.0747.11 ▼6.31
Posts /wp-admin/edit.php3.43 ▲0.0752.89 ▲2.56
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.09 ▼10.72
Media Library /wp-admin/upload.php3.30 ▲0.0736.91 ▼0.08

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for DOB Field For CF7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.291.69 ▼0.0742.22 ▼2.49
Dashboard /wp-admin2,192 ▲185.55 ▼0.1086.21 ▼5.2939.09 ▼5.74
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0235.74 ▼5.9234.24 ▼3.43
Add New Post /wp-admin/post-new.php1,526 ▼023.67 ▲0.61631.88 ▼43.6754.58 ▲2.80
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0097.13 ▼8.1240.63 ▼1.49

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dob-field-for-cf7/modules/dob.php:140
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dob-field-for-cf7/modules/dob.php:140

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

dob-field-for-cf7/dob-field-for-cf7.php Passed 13 tests

Analyzing the main PHP file in "DOB Field For CF7" version 1.0.2
56 characters long description:
Add a date of birth input field to your Contact Form 7.

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 plugin316 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26117316

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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 functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin