89% controller-fields-for-contact-form-7

Code Review | Controller Fields for Contact Form 7

WordPress plugin Controller Fields for Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: controller-fields...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: May 9, 2023
  • Latest release: May 9, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tessawatkinsllc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /427 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.75ms] Passed 4 tests

This is a short check of server-side resources used by Controller Fields for Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0850.33 ▲7.87
Dashboard /wp-admin3.44 ▲0.1452.01 ▼2.35
Posts /wp-admin/edit.php3.56 ▲0.2049.73 ▼0.15
Add New Post /wp-admin/post-new.php6.03 ▲0.1487.59 ▼14.02
Media Library /wp-admin/upload.php3.37 ▲0.1440.40 ▲1.52

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Controller Fields for Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.69 ▲0.321.96 ▼0.0443.49 ▼3.67
Dashboard /wp-admin2,198 ▲245.59 ▲0.0686.44 ▼9.9640.28 ▼1.69
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0336.10 ▼4.3536.39 ▼0.35
Add New Post /wp-admin/post-new.php1,529 ▲122.81 ▼0.25655.44 ▼1.6868.66 ▼1.23
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.02102.34 ▼0.8848.40 ▲4.79

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (A screenshot of the four (4) new buttons added in the Contact Form 7 form edit screen.), #2 (Form-tag generator for the select controller), #3 (Form-tag generator for the checkbox controller), #4 (Form-tag generator for the radio controller), #5 (Form-tag generator for the controlled form tag wrapper), #6 (Example of a select controller field configured to control a text field in the form edit screen), #7 (Animated GIF example of the user selecting the option in the select controller field to hide and show the text field)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

controller-fields-for-contact-form-7/controller-fields-for-contact-form-7.php 92% from 13 tests

This is the main PHP file of "Controller Fields for Contact Form 7" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,096 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP472319829
JavaScript21046246
CSS23021

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected