84% advanced-forms

Code Review | Advanced Forms for ACF

WordPress plugin Advanced Forms for ACF scored84%from 54 tests.

About plugin

  • Plugin page: advanced-forms
  • Plugin version: 1.9.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 13, 2016
  • Latest release: Jul 26, 2023
  • Number of updates: 67
  • Update frequency: every 36.5 days
  • Top authors: fabianlindfors (92.54%)philkurth (8.96%)

Code review

54 tests

User reviews

41 reviews

Install metrics

3,000+ active /80,265 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Advanced Forms for ACF
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.44 ▼4.52
Dashboard /wp-admin3.31 ▼0.0344.79 ▼15.72
Posts /wp-admin/edit.php3.36 ▲0.0146.51 ▲0.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.51 ▼19.47
Media Library /wp-admin/upload.php3.23 ▲0.0134.31 ▼0.32

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Forms for ACF
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.58 ▼1.031.71 ▼0.3043.26 ▲0.03
Dashboard /wp-admin2,218 ▲305.81 ▲0.9295.25 ▼22.8637.62 ▼9.60
Posts /wp-admin/edit.php2,103 ▲142.03 ▲0.0443.24 ▲4.7535.42 ▲0.09
Add New Post /wp-admin/post-new.php1,549 ▲3018.77 ▼4.41644.79 ▼8.0852.76 ▲3.32
Media Library /wp-admin/upload.php1,394 ▲34.22 ▼0.0795.14 ▼12.3845.72 ▼0.28

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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)
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
Almost there! Just fix the following items
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-forms/core/core-emails.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-forms/admin/forms/forms-preview.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-forms/acf/fields/divider.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-forms/admin/admin-entries.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-forms/core/forms/forms-submissions.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-forms/acf/fields/page.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-forms/acf/fields/field_select.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-forms/admin/forms/forms-export.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-forms/acf/acf-additions.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/advanced-forms/admin/admin-restrictions.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: acf form, acf, contact form, form builder, advanced custom fields...

advanced-forms/advanced-forms.php Passed 13 tests

Analyzing the main PHP file in "Advanced Forms for ACF" version 1.9.3.2
79 characters long description:
Flexible and developer-friendly forms with the power of Advanced Custom Fields.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,578 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,1541,2703,524
PO File35436361,155
JavaScript6141103478
CSS410767421

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.14
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods147
▷ Static methods64.08%
▷ Public methods14095.24%
▷ Protected methods00.00%
▷ Private methods74.76%
Functions40
▷ Named functions3895.00%
▷ Anonymous functions25.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.81MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner-1544x500.png68.03KB20.10KB▼ 70.46%
assets/images/logo-80.png20.80KB1.82KB▼ 91.25%
assets/images/icon-128x128.png20.56KB1.02KB▼ 95.02%
assets/images/screenshot-3.png66.40KB18.85KB▼ 71.62%
assets/images/banner-772x250.png41.63KB9.44KB▼ 77.33%