84% pods-gravity-forms

Code Review | Pods Gravity Forms Add-On

WordPress plugin Pods Gravity Forms Add-On scored84%from 54 tests.

About plugin

  • Plugin page: pods-gravity-forms
  • Plugin version: 1.4.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Mar 4, 2016
  • Latest release: Jul 22, 2022
  • Number of updates: 19
  • Update frequency: every 155.6 days
  • Top authors: sc0ttkclark (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /25,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Pods Gravity Forms Add-On
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.92 ▼3.97
Dashboard /wp-admin3.33 ▲0.0243.78 ▼3.17
Posts /wp-admin/edit.php3.38 ▲0.0245.78 ▲0.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.26 ▼6.12
Media Library /wp-admin/upload.php3.25 ▲0.0232.36 ▼1.34

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

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

Browser metrics Passed 4 tests

Pods Gravity Forms Add-On: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.24 ▼1.134.69 ▲2.8848.09 ▲2.23
Dashboard /wp-admin2,210 ▲195.85 ▼0.05101.92 ▲1.2937.89 ▼6.51
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0237.65 ▼1.0839.56 ▲5.43
Add New Post /wp-admin/post-new.php1,422 ▼10017.06 ▼6.00506.06 ▼162.5640.45 ▼8.11
Media Library /wp-admin/upload.php1,392 ▲14.23 ▲0.04100.80 ▲2.1240.49 ▼2.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pods-gravity-forms/pods-gravity-forms.php:35
    • > PHP Warning
      Use of undefined constant PODS_GF_DIR - assumed 'PODS_GF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/pods-gravity-forms/includes/Pods_GF_Addon.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'PODS_GF_DIRincludes/Pods_GF.php' (include_path='.:/usr/share/php') in wp-content/plugins/pods-gravity-forms/includes/Pods_GF_Addon.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/pods-gravity-forms/includes/Pods_GF_CLI.php:6
    • > PHP Warning
      require_once(PODS_GF_DIRincludes/Pods_GF.php): failed to open stream: No such file or directory in wp-content/plugins/pods-gravity-forms/includes/Pods_GF_Addon.php on line 2

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: pods, gravity forms, form mapping

pods-gravity-forms/pods-gravity-forms.php Passed 13 tests

The primary PHP file in "Pods Gravity Forms Add-On" version 1.4.5 is used by WordPress to initiate all plugin functionality
121 characters long description:
Integration with Gravity Forms (https://www.gravityforms.com/); Provides a UI for mapping a Form's submissions into a Pod

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin6,108 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP72,0032,2735,807
SVG202111
YAML5113197
JavaScript227890
CSS1003

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 159)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity214.50
▷ Minimum class complexity4.00
▷ Maximum class complexity933.00
Average method complexity8.96
▷ Minimum method complexity1.00
▷ Maximum method complexity159.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods161
▷ Static methods4326.71%
▷ Public methods15797.52%
▷ Protected methods00.00%
▷ Private methods42.48%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 1.16MB with 0.75MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-3.png156.29KB48.21KB▼ 69.15%
.wordpress-org/icon-256x256.png25.96KB8.90KB▼ 65.72%
.wordpress-org/screenshot-6.png68.66KB22.86KB▼ 66.71%
.wordpress-org/banner-300x100.png20.31KB9.80KB▼ 51.77%
.wordpress-org/screenshot-2.png157.27KB47.72KB▼ 69.66%