83% visual-builder-for-contact-form-7

Code Review | Visual Builder for Contact Form 7

WordPress plugin Visual Builder for Contact Form 7 scored83%from 54 tests.

About plugin

  • Plugin page: visual-builder-fo...
  • Plugin version: 2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Sep 17, 2021
  • Number of updates: 19
  • Update frequency: every 115.9 days
  • Top authors: etruel (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /23,855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Visual Builder for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.71 ▼1.55
Dashboard /wp-admin3.31 ▲0.0042.39 ▼4.05
Posts /wp-admin/edit.php3.36 ▲0.0040.67 ▼3.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.73 ▲2.23
Media Library /wp-admin/upload.php3.23 ▲0.0031.47 ▼1.95

Server storage [IO: ▲0.95MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Visual Builder for Contact Form 7: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.221.59 ▲0.0841.17 ▼0.33
Dashboard /wp-admin2,192 ▲145.49 ▼0.2384.78 ▼19.4140.74 ▲0.55
Posts /wp-admin/edit.php2,100 ▲181.98 ▲0.0336.50 ▲0.2433.72 ▼2.38
Add New Post /wp-admin/post-new.php1,535 ▲918.58 ▼4.74637.05 ▼40.5968.41 ▲6.14
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.0794.30 ▼4.0443.02 ▲0.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • 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
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-builder-for-contact-form-7/cf7-visual-builder.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Standard textarea from Contact Form 7, will be replaced with Visual Builder. Every field without html tags is reflected with

    tag in textarea when the form is saved.), #2 (New areas added after activate the plugin. Now you can see the textarea with code highlighter with some themes to choice. At right-top cornner an eye to show or hide the visual form fields.), #3 (Now you can Drag & Drop to change fields order. (If Adds a new field with above tags, must save to see changes in Visual Builder)), #4 (After Drop a field you'll see the change also in textarea. You must save Form to save all you have changes.), #5 (Option to delete a field and its labels just with a click.), #6 (Click de eye to hide/show the Visual Builder.)

You can take inspiration from this readme.txt

visual-builder-for-contact-form-7/cf7-visual-builder.php 92% from 13 tests

"Visual Builder for Contact Form 7" version 2.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("visual-builder-for-contact-form-7.php" instead of "cf7-visual-builder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin11,612 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript161,1331,19010,643
CSS88235508
PHP2107169414
PO File1121347

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.20
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png45.78KB16.58KB▼ 63.80%