99% date-time-range-picker-gravityforms

Code Review | Date And Time Range Picker

WordPress plugin Date And Time Range Picker scored 99% from 54 tests.

About plugin

  • Plugin page: date-time-range-p...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.1
  • WordPress version: 5.9.2
  • First release: Aug 10, 2019
  • Latest release: Sep 3, 2020
  • Number of updates: 8
  • Update frequency: every 48.8 days
  • Top authors: salarsadeghi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 1,062 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Date And Time Range Picker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0154.64 ▲5.00
Dashboard /wp-admin3.41 ▲0.0032.89 ▼1.73
Posts /wp-admin/edit.php3.64 ▲0.0041.47 ▲4.28
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.48 ▼1,244.50
Media Library /wp-admin/upload.php3.30 ▲0.0024.92 ▲1.70

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Date And Time Range Picker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.84 ▼0.075.85 ▼1.062.40 ▼0.33
Dashboard /wp-admin2,888 ▲276.14 ▲0.07116.51 ▼34.23153.39 ▼22.04
Posts /wp-admin/edit.php2,691 ▼03.24 ▲0.0166.57 ▲2.27140.23 ▼7.33
Add New Post /wp-admin/post-new.php1,690 ▲420.85 ▲1.35419.98 ▼16.88165.07 ▲6.64
Media Library /wp-admin/upload.php1,698 ▼05.53 ▲0.05144.02 ▼5.46182.99 ▼11.10

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 Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output 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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: date, gravityforms, picker, time, range

date-time-range-picker-gravityforms/data-time-range-picker.php 85% from 13 tests

The main PHP script in "Date And Time Range Picker" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("date-time-range-picker-gravityforms.php" instead of "data-time-range-picker.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,440 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318233763
CSS11072465
PO File18285211
JavaScript1071

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.80
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png60.34KB21.42KB▼ 64.50%
assets/screenshot-3.png65.77KB23.35KB▼ 64.49%
assets/screenshot-1.png37.04KB13.64KB▼ 63.17%