10% cf7-sendinblue-opt-in-checkbox

Code Review | Contact Form 7 SendInBlue Opt-in Checkbox

WordPress plugin Contact Form 7 SendInBlue Opt-in Checkbox scored10%from 54 tests.

About plugin

  • Plugin page: cf7-sendinblue-op...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 19, 2018
  • Latest release: Apr 22, 2018
  • Number of updates: 6
  • Update frequency: every 5.7 days
  • Top authors: erellsworth (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /3,436 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SendinBlue_CF7::activate() should not be called statically

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.17ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 SendInBlue Opt-in Checkbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.1341.71 ▼1.59
Dashboard /wp-admin3.70 ▲0.1351.29 ▼5.99
Posts /wp-admin/edit.php3.75 ▲0.0754.50 ▲2.93
Add New Post /wp-admin/post-new.php6.21 ▲0.0797.71 ▼14.96
Media Library /wp-admin/upload.php3.56 ▲0.0740.46 ▲1.86

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 SendInBlue Opt-in Checkbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.37 ▲0.001.90 ▲0.3342.62 ▼4.78
Dashboard /wp-admin2,201 ▲215.69 ▲0.0189.95 ▲1.6838.35 ▼10.51
Posts /wp-admin/edit.php2,106 ▲92.00 ▲0.0140.53 ▲2.3039.36 ▲8.09
Add New Post /wp-admin/post-new.php1,558 ▲1218.34 ▼4.63605.91 ▼72.9051.35 ▼4.00
Media Library /wp-admin/upload.php1,406 ▲94.22 ▼0.02101.57 ▼2.4547.27 ▼1.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V1.0/examples/tutorial1.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require(EE_SIB_CF7_PATH/mailin-api-php/V2.0/Mailin.php): failed to open stream: No such file or directory in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/sendinblue.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Sendinblue\\Mailin' not found in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/src/Sendinblue/examples/tutorial3.php:8
    • > PHP Fatal error
      require(): Failed opening required 'Mailin.php' (include_path='.:/usr/share/php') in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V2.0/examples/tutorial3.php on line 3
    • > PHP Fatal error
      Uncaught ArgumentCountError: Too few arguments to function Mailin::get_campaigns(), 0 passed in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V1.0/examples/tutorial2.php on line 13 and exactly 4 expected in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V1.0/mailin.php:116
    • > PHP Fatal error
      require(): Failed opening required 'EE_SIB_CF7_PATH/mailin-api-php/V2.0/Mailin.php' (include_path='.:/usr/share/php') in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/sendinblue.php on line 4
    • > PHP Fatal error
      require(): Failed opening required 'Mailin.php' (include_path='.:/usr/share/php') in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V2.0/examples/tutorial2.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Sendinblue\\Mailin' not found in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/src/Sendinblue/examples/tutorial2.php:8
    • > PHP Warning
      require(Mailin.php): failed to open stream: No such file or directory in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V2.0/examples/tutorial3.php on line 3
    • > PHP Warning
      require(Mailin.php): failed to open stream: No such file or directory in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V2.0/examples/tutorial2.php on line 3
    • > PHP Fatal error
      Uncaught ArgumentCountError: Too few arguments to function Mailin::send_sms(), 5 passed in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V1.0/examples/tutorial3.php on line 13 and exactly 6 expected in wp-content/plugins/cf7-sendinblue-opt-in-checkbox/mailin-api-php/V1.0/mailin.php:100

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

cf7-sendinblue-opt-in-checkbox/send-in-blue-wpcf7.php 92% from 13 tests

The entry point to "Contact Form 7 SendInBlue Opt-in Checkbox" version 1.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cf7-sendinblue-opt-in-checkbox.php" instead of "send-in-blue-wpcf7.php")

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 plugin2,315 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP141941,1501,199
Markdown923801,092
JSON12024

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity8.25
▷ Minimum class complexity5.00
▷ Maximum class complexity10.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods214
▷ Static methods00.00%
▷ Public methods21198.60%
▷ Protected methods00.00%
▷ Private methods31.40%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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