84% gf-dynamic-fields

Code Review | Gravity Forms Dynamic Fields

WordPress plugin Gravity Forms Dynamic Fields scored84%from 54 tests.

About plugin

  • Plugin page: gf-dynamic-fields
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 9, 2018
  • Latest release: Sep 13, 2018
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: zaus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /867 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Gravity Forms Dynamic Fields
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.43 ▲2.34
Dashboard /wp-admin3.31 ▲0.0142.66 ▼2.01
Posts /wp-admin/edit.php3.36 ▲0.0050.01 ▲0.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.12 ▼21.65
Media Library /wp-admin/upload.php3.23 ▲0.0033.82 ▼0.55

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Gravity Forms Dynamic Fields
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.141.70 ▲0.1442.57 ▲3.39
Dashboard /wp-admin2,203 ▲115.76 ▲0.7996.76 ▼17.8637.22 ▼2.19
Posts /wp-admin/edit.php2,092 ▲31.96 ▼0.0738.56 ▼1.2434.74 ▼1.58
Add New Post /wp-admin/post-new.php1,537 ▲1718.39 ▼4.86623.72 ▲12.0464.44 ▲5.97
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0192.03 ▼9.3541.82 ▼2.99

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gf-dynamic-fields/gravity-forms-dynamic-fields.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Configuring Gravity Forms advanced field setting 'allow field to be populated dynamically') image not found
The official readme.txt is a good inspiration

gf-dynamic-fields/gravity-forms-dynamic-fields.php 92% from 13 tests

The entry point to "Gravity Forms Dynamic Fields" version 0.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gf-dynamic-fields.php" instead of "gravity-forms-dynamic-fields.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
Everything looks great! No dangerous files found in this plugin142 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1242482
Markdown129060

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity8.67
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants00.00%
▷ Class constants17100.00%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png71.74KB34.38KB▼ 52.07%