100% acf-date-selector

Code Review | Advanced Custom Fields: Date Selector

WordPress plugin Advanced Custom Fields: Date Selector scored 100% from 54 tests.

About plugin

  • Plugin page: acf-date-selector
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.2.2
  • WordPress version: 5.9.2
  • First release: Jul 10, 2019
  • Latest release: Jul 10, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: kenkeydev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 512 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼291.27ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields: Date Selector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0152.91 ▲4.67
Dashboard /wp-admin3.41 ▲0.0132.67 ▼1.43
Posts /wp-admin/edit.php3.65 ▲0.0136.38 ▼0.83
Add New Post /wp-admin/post-new.php6.88 ▼0.0890.54 ▼1,162.42
Media Library /wp-admin/upload.php3.30 ▲0.0123.52 ▼0.41

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Date Selector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲4016.17 ▲0.396.95 ▲0.712.05 ▼0.67
Dashboard /wp-admin2,895 ▲346.10 ▼0.09114.07 ▼20.17156.28 ▼7.88
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0063.97 ▼0.21139.73 ▲1.49
Add New Post /wp-admin/post-new.php1,661 ▼5021.78 ▲0.47409.31 ▼8.07161.23 ▲3.84
Media Library /wp-admin/upload.php1,698 ▲35.53 ▲0.00160.54 ▲20.10185.15 ▼5.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: acf, birthday, select2, age, dateofbirth...

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

The entry point to "Advanced Custom Fields: Date Selector" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-date-selector.php" instead of "acf-field-date-selector.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin199 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2205352169
JavaScript1183215
Markdown510015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.50
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.68KB5.50KB▼ 75.76%