84% gf-privacy-addon

Code Review | Gravity Forms Privacy AddOn

WordPress plugin Gravity Forms Privacy AddOn scored 84% from 54 tests.

About plugin

  • Plugin page: gf-privacy-addon
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-4.9.6
  • WordPress version: 6.3.1
  • First release: May 24, 2018
  • Latest release: May 24, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: andymoonshine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,216 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 gracefully, with no errors

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

Server-side resources used by Gravity Forms Privacy AddOn
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.51 ▼5.63
Dashboard /wp-admin3.31 ▲0.0044.64 ▼3.61
Posts /wp-admin/edit.php3.36 ▲0.0044.97 ▼2.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.70 ▼14.23
Media Library /wp-admin/upload.php3.23 ▲0.0035.98 ▲1.50

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Gravity Forms Privacy AddOn
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.56 ▼0.614.07 ▲2.2640.46 ▼13.71
Dashboard /wp-admin2,203 ▲125.79 ▼0.1192.97 ▼9.0337.20 ▼4.33
Posts /wp-admin/edit.php2,089 ▼01.96 ▼0.0840.34 ▼2.6635.15 ▲0.03
Add New Post /wp-admin/post-new.php1,533 ▼023.27 ▲0.06609.45 ▼37.5156.77 ▲0.74
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0093.93 ▼0.5340.73 ▼6.85

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 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/gf-privacy-addon/class-gfprivacyaddon.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-privacy-addon/gravityforms-privacy-addon.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% 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: gravity forms, privacy, gdpr

gf-privacy-addon/gravityforms-privacy-addon.php 92% from 13 tests

The primary PHP file in "Gravity Forms Privacy AddOn" version 0.1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gf-privacy-addon.php" instead of "gravityforms-privacy-addon.php")

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 detected133 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP256112133

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.00
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods225.00%
▷ Public methods8100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin