94% advanced-custom-fields-contact-form-7-field

Code Review | Advanced Custom Fields - Contact Form 7 Field

WordPress plugin Advanced Custom Fields - Contact Form 7 Field scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.9.2
  • First release: May 21, 2013
  • Latest release: Apr 23, 2014
  • Number of updates: 21
  • Update frequency: every 16.1 days
  • Top authors: taylor.mitchellstjoseph (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

4,000+ active / 21,531 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼296.11ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Fields - Contact Form 7 Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0153.38 ▲4.44
Dashboard /wp-admin3.45 ▲0.0134.95 ▲1.68
Posts /wp-admin/edit.php3.68 ▲0.0137.76 ▲0.14
Add New Post /wp-admin/post-new.php6.92 ▼0.0899.57 ▼1,184.53
Media Library /wp-admin/upload.php3.33 ▲0.0122.79 ▼1.72

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Custom Fields - Contact Form 7 Field: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.85 ▲0.205.73 ▼0.622.67 ▼0.41
Dashboard /wp-admin2,895 ▲376.15 ▼0.05116.07 ▼17.43157.07 ▼3.13
Posts /wp-admin/edit.php2,688 ▼63.24 ▼0.0063.75 ▼0.23140.73 ▼1.76
Add New Post /wp-admin/post-new.php1,661 ▼716.03 ▼3.85415.93 ▲15.85160.36 ▼2.12
Media Library /wp-admin/upload.php1,695 ▼35.55 ▲0.04141.06 ▼2.56182.49 ▲1.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
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 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× 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/advanced-custom-fields-contact-form-7-field/acf_cf7-v4.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-contact-form-7-field/acf-cf7.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'acf_Field' not found in wp-content/plugins/advanced-custom-fields-contact-form-7-field/acf_cf7-v3.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: contact form 7, acf, advanced custom fields

advanced-custom-fields-contact-form-7-field/acf-cf7.php 92% from 13 tests

The entry point to "Advanced Custom Fields - Contact Form 7 Field" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-custom-fields-contact-form-7-field.php" instead of "acf-cf7.php")

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
There were no executable files found in this plugin421 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3130357397
Markdown116024

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.00
▷ Minimum class complexity2.00
▷ Maximum class complexity22.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin