67% double-opt-in

Code Review | Double Opt-In (Avada, Contact Form 7) - GDPR Ready

WordPress plugin Double Opt-In (Avada, Contact Form 7) - GDPR Ready scored67%from 54 tests.

About plugin

  • Plugin page: double-opt-in
  • Plugin version: 2.15
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 16, 2022
  • Latest release: Oct 1, 2023
  • Number of updates: 14
  • Update frequency: every 20.8 days
  • Top authors: forge12 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /1,202 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼2.64ms] Passed 4 tests

An overview of server-side resources used by Double Opt-In (Avada, Contact Form 7) - GDPR Ready
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2142.41 ▼1.85
Dashboard /wp-admin3.52 ▲0.2250.69 ▲2.12
Posts /wp-admin/edit.php3.63 ▲0.2849.38 ▲0.74
Add New Post /wp-admin/post-new.php6.12 ▲0.2485.83 ▼5.86
Media Library /wp-admin/upload.php3.44 ▲0.2234.16 ▼3.60
OptIn View /wp-admin/admin.php?page=f12-cf7-doubleoptin_optin_view3.3833.31
Categories /wp-admin/admin.php?page=f12-cf7-doubleoptin_categories3.4132.63
Settings /wp-admin/admin.php?page=f12-cf7-doubleoptin_settings3.4131.39
Database /wp-admin/admin.php?page=f12-cf7-doubleoptin_database3.4131.63
Category View /wp-admin/admin.php?page=f12-cf7-doubleoptin_categories_view3.3832.15
Dashboard /wp-admin/admin.php?page=f12-cf7-doubleoptin3.5030.87

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 64 new files
Database: 2 new tables, 8 new options
New tables
wp_f12_cf7_doubleoptin_categories
wp_f12_cf7_doubleoptin
New WordPress options
widget_theysaidso_widget
widget_recent-posts
f12-cf7-doubleoptin_version
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for Double Opt-In (Avada, Contact Form 7) - GDPR Ready
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲13013.43 ▼1.031.78 ▼0.0844.81 ▼4.22
Dashboard /wp-admin2,268 ▲775.23 ▼0.65111.96 ▼13.4342.53 ▼4.67
Posts /wp-admin/edit.php2,151 ▲622.31 ▲0.3139.82 ▼0.5236.62 ▲0.34
Add New Post /wp-admin/post-new.php1,569 ▲3623.01 ▲0.02639.49 ▼60.1034.63 ▼24.74
Media Library /wp-admin/upload.php1,447 ▲624.49 ▲0.3299.96 ▼4.6543.70 ▼1.94
OptIn View /wp-admin/admin.php?page=f12-cf7-doubleoptin_optin_view7871.5310.4422.65
Categories /wp-admin/admin.php?page=f12-cf7-doubleoptin_categories9461.8427.9028.76
Settings /wp-admin/admin.php?page=f12-cf7-doubleoptin_settings1,3461.8727.4929.61
Database /wp-admin/admin.php?page=f12-cf7-doubleoptin_database9421.8224.1725.86
Category View /wp-admin/admin.php?page=f12-cf7-doubleoptin_categories_view7851.539.4719.59
Dashboard /wp-admin/admin.php?page=f12-cf7-doubleoptin1,0711.8322.8028.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_f12_cf7_doubleoptin
    • wp_f12_cf7_doubleoptin_categories
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • f12-cf7-doubleoptin_version
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=f12-cf7-doubleoptin_categories_view
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)
    • > GET request to /wp-admin/admin.php?page=f12-cf7-doubleoptin_optin_view
    • > Notice in wp-content/plugins/double-opt-in/ui/UIOptinView.class.php+61
    Undefined index: hash
    • > GET request to /wp-admin/admin.php?page=f12-cf7-doubleoptin_optin_view
    • > Error in wp-content/plugins/double-opt-in/ui/UIOptinView.class.php+76
    Uncaught Error: Call to a member function get_hash() on null in wp-content/plugins/double-opt-in/ui/UIOptinView.class.php:76
    Stack trace:
    #0 wp-content/plugins/double-opt-in/core/UIPage.class.php(121): forge12\contactform7\CF7DoubleOptIn\UIOptinView->theContent()
    #1 wp-includes/class-wp-hook.php(310): forge12\contactform7\CF7DoubleOptIn\UIPage->renderContent()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-content/plugins/double-opt-in/core/UI.class.php(298): do_action()
    #5 wp-content/plugins/double-opt-in/core/UI.class.php(240): forge12\contactform7\CF7DoubleOptIn\UI->render()
    #6 wp-includes/class-wp-hook.php(310): forge12\contactform7\CF7DoubleOptIn\UI->forge12\contactform7\CF7DoubleOptIn\{closure}()
    #7 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #
    • > GET request to /wp-admin/admin.php?page=f12-cf7-doubleoptin_categories_view
    • > Notice in wp-content/plugins/double-opt-in/ui/UICategoriesView.class.php+80
    Undefined index: id
    • > GET request to /wp-admin/admin.php?page=f12-cf7-doubleoptin_categories_view
    • > Error in wp-content/plugins/double-opt-in/ui/UICategoriesView.class.php+110
    Uncaught Error: Call to a member function get_id() on null in wp-content/plugins/double-opt-in/ui/UICategoriesView.class.php:110
    Stack trace:
    #0 wp-content/plugins/double-opt-in/core/UIPage.class.php(121): forge12\contactform7\CF7DoubleOptIn\UICategoriesView->theContent()
    #1 wp-includes/class-wp-hook.php(310): forge12\contactform7\CF7DoubleOptIn\UIPage->renderContent()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-content/plugins/double-opt-in/core/UI.class.php(298): do_action()
    #5 wp-content/plugins/double-opt-in/core/UI.class.php(240): forge12\contactform7\CF7DoubleOptIn\UI->render()
    #6 wp-includes/class-wp-hook.php(310): forge12\contactform7\CF7DoubleOptIn\UI->forge12\contactform7\CF7DoubleOptIn\{closure}()
    #7 wp-includes/class-wp-hook.php(334): WP_Hook->apply_fi

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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/double-opt-in/templates/list-optins.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/double-opt-in/templates/view-optin.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires php: Version format is invalid
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7, #8 in double-opt-in/assets to your readme.txt
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

double-opt-in/CF7DoubleOptIn.class.php 92% from 13 tests

The primary PHP file in "Double Opt-In (Avada, Contact Form 7) - GDPR Ready" version 2.15 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("double-opt-in.php" instead of "CF7DoubleOptIn.class.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected6,292 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP357881,3994,065
PO File2256304760
JavaScript64529621
HTML45730445
CSS48446401

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.52
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes33
▷ Abstract classes26.06%
▷ Concrete classes3193.94%
▷ Final classes00.00%
Methods242
▷ Static methods187.44%
▷ Public methods17672.73%
▷ Protected methods218.68%
▷ Private methods4518.60%
Functions12
▷ Named functions650.00%
▷ Anonymous functions650.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
mails/newsletter_en_3.png28.52KB10.18KB▼ 64.32%
mails/blank.png3.24KB0.73KB▼ 77.36%
core/assets/logo-forge12.png10.04KB3.91KB▼ 61.10%
core/assets/logo-forge12-dark.png18.66KB6.28KB▼ 66.37%
mails/newsletter_en_2.png20.38KB8.76KB▼ 57.01%