84% gravity-forms-entry-expiration

Code Review | Entry Expiration for Gravity Forms

WordPress plugin Entry Expiration for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-ent...
  • Plugin version: 2.2.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Aug 1, 2023
  • Number of updates: 22
  • Update frequency: every 146.1 days
  • Top authors: travislopes (90.91%)forgravity (13.64%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /42,384 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: ▼6.34ms] Passed 4 tests

Analyzing server-side resources used by Entry Expiration for Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.03 ▼3.20
Dashboard /wp-admin3.31 ▼0.0347.21 ▼16.69
Posts /wp-admin/edit.php3.36 ▲0.0152.66 ▼0.63
Add New Post /wp-admin/post-new.php5.89 ▲0.01103.08 ▼4.82
Media Library /wp-admin/upload.php3.23 ▲0.0137.53 ▲4.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Entry Expiration for Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.071.87 ▲0.0540.42 ▼3.30
Dashboard /wp-admin2,195 ▲215.61 ▲0.0097.52 ▲4.4139.33 ▼1.81
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0240.00 ▲2.4639.76 ▲3.91
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▼0.05669.22 ▲8.3453.90 ▲1.15
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.01101.56 ▲2.5844.16 ▲1.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gravity-forms-entry-expiration/class-gf-entryexpiration.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-entry-expiration/entryexpiration.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% 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
3 plugin tags: entry, expiration, gravity forms

gravity-forms-entry-expiration/entryexpiration.php 92% from 13 tests

The primary PHP file in "Entry Expiration for Gravity Forms" version 2.2.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gravity-forms-entry-expiration.php" instead of "entryexpiration.php")

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
No dangerous file extensions were detected342 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2197400339
CSS1003

PHP code Passed 2 tests

This is a very shot 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.29
Average class complexity19.00
▷ Minimum class complexity2.00
▷ Maximum class complexity36.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin