94% acf-gravityforms-add-on

Code Review | Advanced Custom Fields: Gravityforms Add-on

WordPress plugin Advanced Custom Fields: Gravityforms Add-on scored 94% from 54 tests.

About plugin

  • Plugin page: acf-gravityforms-...
  • Plugin version: 1.2.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.3
  • WordPress version: 5.9.2
  • First release: Apr 7, 2017
  • Latest release: Jan 10, 2022
  • Number of updates: 33
  • Update frequency: every 53.6 days
  • Top authors: markhowellsmead (57.58%)DannyvanHolten (45.45%)

Code review

54 tests

User reviews

12 reviews

Install metrics

20,000+ active / 208,086 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼303.33ms] Passed 4 tests

Server-side resources used by Advanced Custom Fields: Gravityforms Add-on
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1354.54 ▲4.70
Dashboard /wp-admin3.49 ▲0.0837.82 ▲5.34
Posts /wp-admin/edit.php3.71 ▲0.0735.90 ▼2.82
Add New Post /wp-admin/post-new.php6.95 ▼0.0293.61 ▼1,217.40
Media Library /wp-admin/upload.php3.36 ▲0.0725.76 ▲2.21

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Gravityforms Add-on
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲3916.09 ▲0.455.94 ▲0.292.07 ▲0.09
Dashboard /wp-admin2,915 ▲616.13 ▼0.02115.16 ▼13.06154.58 ▼6.08
Posts /wp-admin/edit.php2,703 ▲93.24 ▼0.0062.30 ▼1.27137.03 ▼5.74
Add New Post /wp-admin/post-new.php1,730 ▲6921.88 ▲5.80400.96 ▼6.21157.54 ▲7.91
Media Library /wp-admin/upload.php1,718 ▲205.53 ▼0.01145.58 ▲5.44184.31 ▼0.46

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > 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 just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: acf, gravityforms, gravity form, advanced custom fields, custom fields...

acf-gravityforms-add-on/acf-gravityforms-add-on.php Passed 13 tests

The entry point to "Advanced Custom Fields: Gravityforms Add-on" version 1.2.10 is a PHP file that has certain tags in its header comment area
60 characters long description:
Advanced Custom Field with which we can select Gravityforms.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin745 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12163334700
PO File16645

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.57
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods47
▷ Static methods36.38%
▷ Public methods4595.74%
▷ Protected methods00.00%
▷ Private methods24.26%
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
PNG images were not found in this plugin