94% acf-field-date-time-picker

Code Review | Date and Time Picker Field

WordPress plugin Date and Time Picker Field scored 94% from 54 tests.

About plugin

  • Plugin page: acf-field-date-ti...
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7
  • WordPress version: 5.8.1
  • First release: Apr 5, 2013
  • Latest release: Jan 30, 2017
  • Number of updates: 65
  • Update frequency: every 21.5 days
  • Top authors: PerS (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

10,000+ active / 144,983 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Date and Time Picker Field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0137.54 ▲2.25
Dashboard /wp-admin3.07 ▲0.0149.16 ▲12.22
Posts /wp-admin/edit.php3.12 ▲0.0150.18 ▲5.64
Add New Post /wp-admin/post-new.php5.42 ▼0.0189.43 ▼559.07
Media Library /wp-admin/upload.php3.01 ▲0.0136.85 ▲3.62

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 63 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Date and Time Picker Field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲9715.86 ▼0.1610.78 ▲0.2643.65 ▼4.10
Dashboard /wp-admin2,967 ▲365.91 ▼0.08150.29 ▼4.00105.10 ▼10.72
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0064.58 ▼1.7183.06 ▼2.89
Add New Post /wp-admin/post-new.php1,683 ▲1118.79 ▲0.16391.27 ▲13.49108.77 ▼7.03
Media Library /wp-admin/upload.php1,807 ▼155.02 ▼0.02178.97 ▲22.41116.33 ▲0.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-field-date-time-picker/date-time-picker-v4.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'acf_Field' not found in wp-content/plugins/acf-field-date-time-picker/date-time-picker-v3.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/acf-field-date-time-picker/acf-date-time-picker.php:29

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: timepicker, custom field, acf, datepicker

acf-field-date-time-picker/acf-date-time-picker.php 92% from 13 tests

The main PHP file in "Date and Time Picker Field" ver. 2.1.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("acf-field-date-time-picker.php" instead of "acf-date-time-picker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,703 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PO File13439100

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity18.00
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
css/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%