93% cf7-to-mailjet

Code Review | Contact Form 7 to Mailjet

WordPress plugin Contact Form 7 to Mailjet scored 93% from 54 tests.

About plugin

  • Plugin page: cf7-to-mailjet
  • Plugin version: 1.7.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.1
  • WordPress version: 5.9.2
  • First release: Aug 28, 2018
  • Latest release: Apr 23, 2021
  • Number of updates: 23
  • Update frequency: every 42.1 days
  • Top authors: youdemus (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

900+ active / 8,423 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼323.47ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 to Mailjet
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.5254.52 ▼77.14
Dashboard /wp-admin3.49 ▲0.0837.19 ▼0.35
Posts /wp-admin/edit.php3.71 ▲0.0844.56 ▲5.98
Add New Post /wp-admin/post-new.php6.96 ▼0.0198.87 ▼1,211.48
Media Library /wp-admin/upload.php3.37 ▲0.0725.87 ▼4.89

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 to Mailjet
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲5115.99 ▲0.377.18 ▲0.112.41 ▼0.32
Dashboard /wp-admin2,898 ▲446.14 ▼0.04123.31 ▼15.18158.66 ▼58.12
Posts /wp-admin/edit.php2,712 ▲213.24 ▼0.0164.42 ▼2.38144.06 ▼0.93
Add New Post /wp-admin/post-new.php1,684 ▼519.93 ▼1.67415.13 ▼45.27185.42 ▲16.32
Media Library /wp-admin/upload.php1,721 ▲235.56 ▲0.07150.97 ▲6.03231.33 ▲37.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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)
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-to-mailjet/cf7_to_mailjet.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (editor-screen-1.png) image not found
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

cf7-to-mailjet/cf7_to_mailjet.php 77% from 13 tests

This is the main PHP file of "Contact Form 7 to Mailjet" version 1.7.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • 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
  • Description: Keep the plugin description shorter than 140 characters (currently 252 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cf7-to-mailjet.php" instead of "cf7_to_mailjet.php")

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
There were no executable files found in this plugin483 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP12927307
PO File2242485
JavaScript10352
CSS15039

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.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