84% 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 scored84%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: 6.3.1
  • 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

7 reviews

Install metrics

3,000+ active /23,385 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Advanced Custom Fields - Contact Form 7 Field
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.38 ▼4.93
Dashboard /wp-admin3.31 ▼0.0355.21 ▼12.76
Posts /wp-admin/edit.php3.36 ▲0.0147.55 ▲4.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.71 ▲0.93
Media Library /wp-admin/upload.php3.23 ▲0.0135.60 ▲1.02

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Custom Fields - Contact Form 7 Field
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.20 ▼1.051.95 ▼0.2647.97 ▲4.75
Dashboard /wp-admin2,206 ▲214.83 ▼1.02101.34 ▼14.2140.71 ▼1.10
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0335.19 ▼3.8631.94 ▼3.95
Add New Post /wp-admin/post-new.php1,538 ▲1923.31 ▼0.07667.84 ▼54.5057.75 ▲0.94
Media Library /wp-admin/upload.php1,385 ▼04.13 ▼0.05108.23 ▲1.7150.18 ▲4.06

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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
    • > 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

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: acf, advanced custom fields, contact form 7

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

The main PHP script in "Advanced Custom Fields - Contact Form 7 Field" version 1.1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file 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 | There should be no dangerous file extensions present in any WordPress plugin
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

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin