84% acf-gravityforms-add-on

Code Review | Advanced Custom Fields: Gravity Forms Add-on

WordPress plugin Advanced Custom Fields: Gravity Forms Add-on scored 84% from 54 tests.

About plugin

  • Plugin page: acf-gravityforms-...
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Nov 11, 2022
  • Number of updates: 48
  • Update frequency: every 42.6 days
  • Top authors: markhowellsmead (70.83%)DannyvanHolten (31.25%)

Code review

54 tests

User reviews

12 reviews

Install metrics

30,000+ active / 347,865 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.65ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields: Gravity Forms Add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.38 ▼16.41
Dashboard /wp-admin3.38 ▲0.0843.52 ▼6.52
Posts /wp-admin/edit.php3.50 ▲0.1447.38 ▲3.95
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.59 ▼6.80
Media Library /wp-admin/upload.php3.31 ▲0.0836.52 ▲3.14

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

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

Browser metrics Passed 4 tests

Advanced Custom Fields: Gravity Forms Add-on: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲4213.26 ▼1.391.51 ▼0.5841.98 ▼3.40
Dashboard /wp-admin2,216 ▲285.79 ▼0.11105.62 ▼7.2838.63 ▼10.98
Posts /wp-admin/edit.php2,104 ▲151.99 ▼0.0147.39 ▲10.4541.47 ▲6.79
Add New Post /wp-admin/post-new.php1,527 ▼617.67 ▼5.62584.64 ▼94.2852.82 ▼9.55
Media Library /wp-admin/upload.php1,401 ▲134.28 ▲0.05102.33 ▼7.2444.72 ▼1.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-gravityforms-add-on/resources/Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-gravityforms-add-on/resources/FieldForV4.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: sayhellogmbh, acf, gravityforms, fields, custom fields...

acf-gravityforms-add-on/acf-gravityforms-add-on.php 92% from 13 tests

The main PHP file in "Advanced Custom Fields: Gravity Forms Add-on" ver. 1.3.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 155 characters long)

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
Success! There were no dangerous files found in this plugin776 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12178434731
PO File16645

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.14
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods49
▷ Static methods48.16%
▷ Public methods4795.92%
▷ Protected methods00.00%
▷ Private methods24.08%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants5100.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