78% double-opt-in-for-cf7

Code Review | Double Opt-in for CF7

WordPress plugin Double Opt-in for CF7 scored78%from 54 tests.

About plugin

  • Plugin page: double-opt-in-for...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: Feb 3, 2022
  • Latest release: Feb 11, 2022
  • Number of updates: 8
  • Update frequency: every 1.0 days
  • Top authors: Elkurczako (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,440 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.86ms] Passed 4 tests

This is a short check of server-side resources used by Double Opt-in for CF7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.60 ▼5.80
Dashboard /wp-admin3.31 ▼0.0446.84 ▼14.11
Posts /wp-admin/edit.php3.36 ▲0.0045.58 ▲1.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.27 ▼13.42
Media Library /wp-admin/upload.php3.23 ▲0.0037.04 ▲1.88
All Opt-In Forms /wp-admin/edit.php?post_type=cf7optin_settings3.0425.43
Double Opt-in Settings /wp-admin/admin.php?page=wpcf7-optin3.0024.59

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

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

Browser metrics Passed 4 tests

Double Opt-in for CF7: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.40 ▲0.031.85 ▼0.0141.07 ▼2.67
Dashboard /wp-admin2,206 ▲184.84 ▼0.98110.64 ▼4.7240.67 ▼5.88
Posts /wp-admin/edit.php2,086 ▼61.98 ▼0.0839.05 ▲1.9333.57 ▲0.45
Add New Post /wp-admin/post-new.php1,537 ▲1818.26 ▼4.96616.66 ▼69.1550.92 ▼1.72
Media Library /wp-admin/upload.php1,382 ▼64.19 ▼0.0296.28 ▼16.8741.96 ▼6.57
All Opt-In Forms /wp-admin/edit.php?post_type=cf7optin_settings280.440.083.67
Double Opt-in Settings /wp-admin/admin.php?page=wpcf7-optin280.440.074.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/double-opt-in-for-cf7/cf7-optin.php
    • > /wp-content/plugins/double-opt-in-for-cf7/inc/optin-submission-class.php
    • > /wp-content/plugins/double-opt-in-for-cf7/inc/optin-settings-class.php
    • > /wp-content/plugins/double-opt-in-for-cf7/admin/cf7optin-admin.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=cf7optin_settings
    • > Network (severe)
    wp-admin/edit.php?post_type=cf7optin_settings - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=wpcf7-optin
    • > Network (severe)
    wp-admin/admin.php?page=wpcf7-optin - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: You can look at the official readme.txt

double-opt-in-for-cf7/cf7-optin.php 85% from 13 tests

The principal PHP file in "Double Opt-in for CF7" v. 1.0.1 is loaded by WordPress automatically on each request
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 ("double-opt-in-for-cf7.php" instead of "cf7-optin.php")
  • 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 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,746 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP41612091,554
PO File1172211628
JavaScript34453422
CSS21111142

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.16
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods2964.44%
▷ Protected methods00.00%
▷ Private methods1635.56%
Functions65
▷ Named functions6295.38%
▷ Anonymous functions34.62%
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
No PNG images were found in this plugin