83% date-time-picker-for-contact-form-7

Code Review | Date Time Picker for Contact Form 7

WordPress plugin Date Time Picker for Contact Form 7 scored 83% from 54 tests.

About plugin

  • Plugin page: date-time-picker-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Oct 6, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 36
  • Update frequency: every 28.8 days
  • Top authors: ruhul080 (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

20,000+ active / 81,659 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.13ms] Passed 4 tests

A check of server-side resources used by Date Time Picker for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.06 ▼8.35
Dashboard /wp-admin3.31 ▲0.0145.04 ▼5.05
Posts /wp-admin/edit.php3.36 ▲0.0046.00 ▲0.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.85 ▼3.44
Media Library /wp-admin/upload.php3.23 ▲0.0036.15 ▲0.79

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Date Time Picker for Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.64 ▼0.986.30 ▲4.3538.74 ▼6.18
Dashboard /wp-admin2,203 ▲144.86 ▼0.12127.32 ▲6.9938.86 ▼6.51
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0639.82 ▲4.2435.08 ▲3.71
Add New Post /wp-admin/post-new.php1,539 ▲2523.32 ▲5.85646.51 ▼10.0053.24 ▲3.30
Media Library /wp-admin/upload.php1,388 ▼04.28 ▲0.0893.24 ▼10.5146.42 ▲0.81

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/date-time-picker-for-contact-form-7/cf7-datetimepicker.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === date-time-picker-for-contact-form-7 === )
The official readme.txt is a good inspiration

date-time-picker-for-contact-form-7/cf7-datetimepicker.php 77% from 13 tests

The main file in "Date Time Picker for Contact Form 7" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 210 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("date-time-picker-for-contact-form-7.php" instead of "cf7-datetimepicker.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected2,790 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42822652,745
PHP1111244
CSS1101

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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