84% gf-datetime-field-add-on

Code Review | Date Time Field Add-On for Gravity Form

WordPress plugin Date Time Field Add-On for Gravity Form scored84%from 54 tests.

About plugin

  • Plugin page: gf-datetime-field...
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2020
  • Latest release: Nov 30, 2023
  • Number of updates: 15
  • Update frequency: every 79.9 days
  • Top authors: awais300 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active /3,898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Date Time Field Add-On for Gravity Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.40 ▼7.72
Dashboard /wp-admin3.31 ▼0.0344.07 ▼17.83
Posts /wp-admin/edit.php3.36 ▲0.0146.31 ▼2.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.40 ▼7.12
Media Library /wp-admin/upload.php3.23 ▲0.0034.27 ▼0.50

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Date Time Field Add-On for Gravity Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.36 ▲0.331.83 ▼0.1936.23 ▼7.20
Dashboard /wp-admin2,195 ▲315.52 ▼0.0992.10 ▼13.8242.36 ▼3.88
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0838.65 ▲0.4635.38 ▲0.09
Add New Post /wp-admin/post-new.php1,526 ▼023.33 ▲0.10636.23 ▼10.5855.92 ▲5.76
Media Library /wp-admin/upload.php1,400 ▲64.07 ▼0.0896.05 ▼3.6441.19 ▼1.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 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 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Awaiswp\\add_action() in wp-content/plugins/gf-datetime-field-add-on/gf-datetime-field-add-on.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gf-datetime-field-add-on/class-awaiswp-datetime-gf-field-addon.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: You can look at the official readme.txt

gf-datetime-field-add-on/gf-datetime-field-add-on.php 92% from 13 tests

The main PHP script in "Date Time Field Add-On for Gravity Form" version 1.2.7 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected3,423 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2288772,583
CSS19115503
PHP470111291
PO File18846

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.75
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected