63% mail-control

Code Review | Mail Control - Email Customizer, SMTP Deliverability, logging, open and click Tracking

WordPress plugin Mail Control - Email Customizer, SMTP Deliverability, logging, open and click Tracking scored63%from 54 tests.

About plugin

  • Plugin page: mail-control
  • Plugin version: 0.3.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2022
  • Latest release: Sep 16, 2023
  • Number of updates: 37
  • Update frequency: every 8.0 days
  • Top authors: rahal.aboulfeth (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /564 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.31MB] [CPU: ▲31.39ms] 75% from 4 tests

Server-side resources used by Mail Control - Email Customizer, SMTP Deliverability, logging, open and click Tracking
It is recommended to improve the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.31MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.02 ▲5.5673.26 ▲31.19
Dashboard /wp-admin9.04 ▲5.7489.31 ▲38.24
Posts /wp-admin/edit.php9.05 ▲5.6980.68 ▲39.00
Add New Post /wp-admin/post-new.php10.14 ▲4.25124.73 ▲23.09
Media Library /wp-admin/upload.php9.04 ▲5.8165.69 ▲33.05
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius9.0564.32

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 335 new files
Database: 2 new tables, 15 new options
New tables
wp_email_event
wp_email
New WordPress options
BACKGROUND_MAILER
fs_active_plugins
mc_db_version
theysaidso_admin_options
can_compress_scripts
fs_accounts
MC_PERMISSION
widget_recent-posts
fs_debug_mode
EMAIL_CUSTOMIZER
...

Browser metrics Passed 4 tests

An overview of browser requirements for Mail Control - Email Customizer, SMTP Deliverability, logging, open and click Tracking
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,021 ▲27514.91 ▲0.241.89 ▼0.2634.15 ▼9.35
Dashboard /wp-admin2,427 ▲2396.59 ▲0.69119.61 ▲12.0341.89 ▼2.56
Posts /wp-admin/edit.php2,336 ▲2443.56 ▲1.5054.57 ▲12.8633.51 ▼0.52
Add New Post /wp-admin/post-new.php1,542 ▼423.14 ▲5.00572.99 ▼65.7333.07 ▼25.28
Media Library /wp-admin/upload.php1,469 ▲784.24 ▲0.0582.22 ▼23.5744.12 ▲2.41
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,3183.2947.2829.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/mail-control/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 2 tables
    • wp_email
    • wp_email_event
  • This plugin does not fully uninstall, leaving 15 options in the database
    • BACKGROUND_MAILER
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • mc_db_version
    • fs_accounts
    • EMAIL_CUSTOMIZER
    • theysaidso_admin_options
    • EMAIL_TRACKING
    • db_upgraded
    • ...

Smoke tests 75% 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 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
Please fix the following items
  • 86× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Mail_Control\\add_filter() in wp-content/plugins/mail-control/includes/integrations/woocommerce.php:157
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/mail-control/vendor/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\XPath\\Extension\\ExtensionInterface' not found in wp-content/plugins/mail-control/vendor/symfony/css-selector/XPath/Extension/AbstractExtension.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/mail-control/vendor/sabberworm/php-css-parser/src/Value/Size.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/mail-control/vendor/symfony/css-selector/Parser/Handler/HashHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/mail-control/vendor/symfony/css-selector/Parser/Handler/CommentHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Exception\\ParseException' not found in wp-content/plugins/mail-control/vendor/symfony/css-selector/Exception/InternalErrorException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' not found in wp-content/plugins/mail-control/vendor/symfony/css-selector/XPath/Translator.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Pelago\\Emogrifier\\HtmlProcessor\\AbstractHtmlProcessor' not found in wp-content/plugins/mail-control/vendor/pelago/emogrifier/src/CssInliner.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/mail-control/vendor/sabberworm/php-css-parser/src/Value/URL.php:11

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: email deliverability, email, smtp, email log, email customizer...

mail-control/mail-control.php 85% from 13 tests

This is the main PHP file of "Mail Control - Email Customizer, SMTP Deliverability, logging, open and click Tracking" version 0.3.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Plugin Name: A shorter plugin name is better (currently 86 characters long instead of max. 70)
  • Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected47,318 lines of code in 282 files:
LanguageFilesBlank linesComment linesLines of code
PHP2519,95622,87444,276
Markdown943201,856
PO File1188193489
JSON100434
JavaScript43659213
XML27028
CSS130013
SVG1009

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity35.21
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces26
Interfaces10
Traits0
Classes151
▷ Abstract classes117.28%
▷ Concrete classes14092.72%
▷ Final classes21.43%
Methods2,016
▷ Static methods26513.14%
▷ Public methods1,51875.30%
▷ Protected methods261.29%
▷ Private methods47223.41%
Functions231
▷ Named functions16169.70%
▷ Anonymous functions7030.30%
Constants215
▷ Global constants12156.28%
▷ Class constants9443.72%
▷ Public constants8186.17%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%