83% contact-form-7-extras

Code Review | Controls for Contact Form 7 (Analytics & Tracking)

WordPress plugin Controls for Contact Form 7 (Analytics & Tracking) scored 83% from 54 tests.

About plugin

  • Plugin page: contact-form-7-ex...
  • Plugin version: 0.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Sep 13, 2014
  • Latest release: May 18, 2023
  • Number of updates: 78
  • Update frequency: every 40.7 days
  • Top authors: kasparsd (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

10,000+ active / 126,690 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.69ms] Passed 4 tests

This is a short check of server-side resources used by Controls for Contact Form 7 (Analytics & Tracking)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.73 ▼9.37
Dashboard /wp-admin3.32 ▲0.0249.03 ▲3.90
Posts /wp-admin/edit.php3.37 ▲0.0247.05 ▼3.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.89 ▼2.61
Media Library /wp-admin/upload.php3.24 ▲0.0235.64 ▲1.02

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Controls for Contact Form 7 (Analytics & Tracking)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.36 ▼0.923.90 ▲1.5440.71 ▼9.59
Dashboard /wp-admin2,206 ▲154.86 ▼0.07109.24 ▲4.2242.17 ▲3.09
Posts /wp-admin/edit.php2,089 ▲32.04 ▼0.0139.13 ▲0.2736.21 ▼2.03
Add New Post /wp-admin/post-new.php1,514 ▼018.07 ▲0.41596.61 ▼76.9849.91 ▼5.92
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.0494.27 ▼9.0244.25 ▲0.14

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-extras/src/class-cf7-extras.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
  • Screenshots: Please add descriptions for these screenshots #2, #3 in contact-form-7-extras/assets to your readme.txt
The official readme.txt is a good inspiration

contact-form-7-extras/plugin.php 85% from 13 tests

The entry point to "Controls for Contact Form 7 (Analytics & Tracking)" version 0.8.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("contact-form-7-extras.php" instead of "plugin.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 204 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected603 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP298187469
JavaScript23210125
CSS1109

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.08MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png81.13KB84.95KB0.00%