90% acf-date-selector

Code Review | Advanced Custom Fields: Date Selector

WordPress plugin Advanced Custom Fields: Date Selector scored90%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: 6.3.1
  • 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 /744 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.10ms] Passed 4 tests

Analyzing 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.47 ▲0.0142.98 ▲0.20
Dashboard /wp-admin3.31 ▲0.0152.20 ▼2.77
Posts /wp-admin/edit.php3.37 ▲0.0149.20 ▼7.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.77 ▼18.72
Media Library /wp-admin/upload.php3.24 ▲0.0140.86 ▲3.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Custom Fields: Date Selector
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.141.90 ▲0.3044.44 ▲2.90
Dashboard /wp-admin2,189 ▲125.60 ▲0.0194.75 ▲8.0037.89 ▼5.44
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0134.36 ▼3.3534.05 ▼0.64
Add New Post /wp-admin/post-new.php1,526 ▼223.00 ▲0.00668.08 ▼19.0751.46 ▼7.49
Media Library /wp-admin/upload.php1,400 ▲64.17 ▲0.02104.78 ▼2.6947.04 ▲2.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: age, acf, birthday, famousui, kennykey...

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

The main PHP file in "Advanced Custom Fields: Date Selector" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as 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 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected199 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2205352169
JavaScript1183215
Markdown510015

PHP code Passed 2 tests

This is a short overview 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

All PNG images should be compressed to minimize bandwidth usage for end users
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%