90% acf-date-time-picker

Code Review | Date & Time Picker for Advanced Custom Fields

WordPress plugin Date & Time Picker for Advanced Custom Fields scored 90% from 54 tests.

About plugin

  • Plugin page: acf-date-time-picker
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2016
  • Latest release: May 3, 2016
  • Number of updates: 16
  • Update frequency: every 4.7 days
  • Top authors: toszcze (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 6,580 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.01MB] [CPU: ▼3.31ms] Passed 4 tests

Server-side resources used by Date & Time Picker for Advanced Custom Fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.62 ▼3.98
Dashboard /wp-admin3.31 ▲0.0148.27 ▲0.56
Posts /wp-admin/edit.php3.36 ▲0.0147.08 ▼1.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.58 ▼8.38
Media Library /wp-admin/upload.php3.24 ▲0.0133.78 ▲3.12

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Date & Time Picker for Advanced Custom Fields
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.111.80 ▲0.0640.45 ▼8.32
Dashboard /wp-admin2,209 ▲215.91 ▲1.07107.22 ▼9.9938.37 ▼9.88
Posts /wp-admin/edit.php2,089 ▼32.00 ▲0.0140.44 ▼1.4934.90 ▼1.44
Add New Post /wp-admin/post-new.php1,533 ▲1923.33 ▲5.86657.94 ▲20.4952.76 ▼5.37
Media Library /wp-admin/upload.php1,391 ▲34.30 ▲0.1199.74 ▼8.5044.00 ▼1.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: custom field, timepicker, datepicker, advanced custom fields, acf

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

This is the main PHP file of "Date & Time Picker for Advanced Custom Fields" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-date-time-picker.php" instead of "acf-date_time_picker.php")

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
Success! There were no dangerous files found in this plugin2,460 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42233251,879
PHP468236380
PO File25660161
CSS36540

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected