83% gf-data-purge

Code Review | Gravity Forms Data Purge

WordPress plugin Gravity Forms Data Purge scored83%from 54 tests.

About plugin

  • Plugin page: gf-data-purge
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 5, 2018
  • Latest release: Apr 7, 2018
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: aandrewdixon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Gravity Forms Data Purge
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.12 ▼0.08
Dashboard /wp-admin3.40 ▲0.1068.76 ▲12.88
Posts /wp-admin/edit.php3.37 ▲0.0248.29 ▼2.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.92 ▼12.66
Media Library /wp-admin/upload.php3.24 ▲0.0233.42 ▼4.55

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
gfdp_option_name
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravity Forms Data Purge
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.18 ▼0.201.96 ▲0.1145.73 ▼1.69
Dashboard /wp-admin2,198 ▲185.66 ▲0.1286.67 ▼13.7839.08 ▼4.76
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0236.05 ▼0.8833.22 ▼2.98
Add New Post /wp-admin/post-new.php1,526 ▼023.53 ▲5.97633.66 ▼43.7651.97 ▼0.72
Media Library /wp-admin/upload.php1,403 ▼04.29 ▲0.0498.13 ▲3.4445.98 ▲2.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • gfdp_option_name

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-data-purge/gravity-forms-data-purge.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: gdpr, data protection, gravity forms

gf-data-purge/gravity-forms-data-purge.php 77% from 13 tests

The main PHP file in "Gravity Forms Data Purge" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gf-data-purge.php" instead of "gravity-forms-data-purge.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected52 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1151352

PHP code Passed 2 tests

This is a very shot review of 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.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin