94% acf-field-for-contact-form-7

Code Review | ACF Field For Contact Form 7

WordPress plugin ACF Field For Contact Form 7 scored 94% from 54 tests.

About plugin

  • Plugin page: acf-field-for-con...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 5.8.1
  • First release: Jun 5, 2018
  • Latest release: Aug 4, 2021
  • Number of updates: 20
  • Update frequency: every 57.8 days
  • Top authors: krishaweb (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active / 26,055 total downloads


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.00MB] [CPU: ▼144.79ms] Passed 4 tests

Analyzing server-side resources used by ACF Field For Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0121.75 ▼0.59
Dashboard /wp-admin3.07 ▲0.0032.26 ▼2.28
Posts /wp-admin/edit.php3.12 ▲0.0128.95 ▼2.78
Add New Post /wp-admin/post-new.php5.43 ▼0.0168.62 ▼573.50
Media Library /wp-admin/upload.php3.01 ▲0.0123.90 ▲0.61

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

ACF Field For Contact Form 7: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,688 ▲8615.99 ▲0.384.96 ▼0.2176.53 ▼1.65
Dashboard /wp-admin2,941 ▲456.11 ▲0.02116.20 ▼15.47165.74 ▼6.37
Posts /wp-admin/edit.php2,749 ▲93.25 ▲0.0366.52 ▼3.65136.89 ▼19.22
Add New Post /wp-admin/post-new.php3,819 ▲8218.89 ▼1.42454.95 ▲30.47160.42 ▼3.68
Media Library /wp-admin/upload.php1,764 ▲125.49 ▼0.03139.54 ▼7.52188.07 ▲1.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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 everything seems fine, this is not 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
Please fix the following
  • 3× 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-field-for-contact-form-7/includes/acf-fields/acf-contact-form-7-v5.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'acf_Field' not found in wp-content/plugins/acf-field-for-contact-form-7/includes/acf-fields/acf-contact-form-7-v3.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-field-for-contact-form-7/includes/acf-fields/acf-contact-form-7-v4.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

acf-field-for-contact-form-7/acf-field-for-contact-form-7.php Passed 13 tests

Analyzing the main PHP file in "ACF Field For Contact Form 7" version 1.6
79 characters long description:
Adds a new 'Contact Form 7' field to the popular Advanced Custom Fields plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin517 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview 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.37
Average class complexity15.00
▷ Minimum class complexity8.00
▷ Maximum class complexity24.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected