83% cf7-submission-dom-tracking

Code Review | Submission DOM tracking for Contact Form 7

WordPress plugin Submission DOM tracking for Contact Form 7 scored83%from 54 tests.

About plugin

  • Plugin page: cf7-submission-do...
  • Plugin version: 2.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 4, 2017
  • Latest release: Sep 23, 2023
  • Number of updates: 51
  • Update frequency: every 43.3 days
  • Top authors: apasionados (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /10,399 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.01MB] [CPU: ▼10.83ms] Passed 4 tests

This is a short check of server-side resources used by Submission DOM tracking for Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.51 ▼4.86
Dashboard /wp-admin3.31 ▼0.0447.68 ▼15.90
Posts /wp-admin/edit.php3.36 ▲0.0049.23 ▼3.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.23 ▼19.29
Media Library /wp-admin/upload.php3.23 ▲0.0034.15 ▼3.04

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Submission DOM tracking for Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.25 ▼0.101.71 ▼0.1442.84 ▼0.13
Dashboard /wp-admin2,195 ▲185.57 ▼0.0985.51 ▼6.6638.32 ▼5.42
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0138.65 ▼3.8832.80 ▼2.79
Add New Post /wp-admin/post-new.php1,526 ▼023.14 ▼0.13594.62 ▼46.0571.74 ▲13.51
Media Library /wp-admin/upload.php1,397 ▼04.23 ▲0.0799.71 ▲5.7042.57 ▲3.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/cf7-submission-dom-tracking/contact-form-7-s-dom-tracking-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cf7-submission-dom-tracking/contact-form-7-s-dom-tracking.php:42

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 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: track forms, contact form, tracking forms, form submission, form

cf7-submission-dom-tracking/contact-form-7-s-dom-tracking.php 77% from 13 tests

The principal PHP file in "Submission DOM tracking for Contact Form 7" v. 2.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-submission-dom-tracking.php" instead of "contact-form-7-s-dom-tracking.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 596 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin551 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21744285
PO File15861266

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions13
▷ Named functions13100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
love_bw.png1.13KB0.34KB▼ 70.07%