78% boldermail

Code Review | Boldermail – Email Marketing and Newsletters for WordPress

WordPress plugin Boldermail – Email Marketing and Newsletters for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: boldermail
  • Plugin version: 2.3.8
  • PHP compatiblity: 7.1.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2019
  • Latest release: Dec 13, 2022
  • Number of updates: 37
  • Update frequency: every 35.5 days
  • Top authors: chvillanuevap (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,713 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.21MB] [CPU: ▼8.36ms] Passed 4 tests

This is a short check of server-side resources used by Boldermail – Email Marketing and Newsletters for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4043.85 ▼3.12
Dashboard /wp-admin3.70 ▲0.3952.10 ▼0.89
Posts /wp-admin/edit.php3.76 ▲0.4156.31 ▲6.51
Add New Post /wp-admin/post-new.php5.61 ▼0.2764.05 ▼35.09
Media Library /wp-admin/upload.php3.56 ▲0.3343.08 ▲5.67
Templates /wp-admin/edit.php?post_type=bm_template4.41100.61
RSS Campaigns /wp-admin/edit.php?post_type=bm_newsletter_rss3.7151.08
Subscribers /wp-admin/edit.php?post_type=bm_subscriber3.7149.24
Add New /wp-admin/post-new.php?post_type=bm_newsletter3.7874.69
Newsletters /wp-admin/edit.php?post_type=bm_newsletter3.7148.98
Settings /wp-admin/edit.php?post_type=bm_newsletter&page=boldermail-settings3.5947.12
Automations /wp-admin/edit.php?post_type=bm_autoresponder3.7047.12
Lists /wp-admin/edit.php?post_type=bm_list3.7049.90

Server storage [IO: ▲7.33MB] [DB: ▲0.45MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 922 new files
Database: no new tables, 10 new options
New WordPress options
boldermail_active_version
boldermail_previous_version
boldermail_queue_flush_rewrite_rules
widget_theysaidso_widget
boldermail_siteurl
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Boldermail – Email Marketing and Newsletters for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲12114.80 ▲0.613.16 ▲0.9842.16 ▼1.83
Dashboard /wp-admin2,308 ▲1206.50 ▲1.53121.44 ▲10.6740.52 ▲3.63
Posts /wp-admin/edit.php2,204 ▲1153.43 ▲1.4457.83 ▲21.2735.56 ▲3.17
Add New Post /wp-admin/post-new.php1,596 ▲6119.34 ▼3.83672.76 ▼18.0536.27 ▼25.25
Media Library /wp-admin/upload.php1,743 ▲3554.99 ▲0.78121.78 ▲5.2343.21 ▼6.61
Templates /wp-admin/edit.php?post_type=bm_template2,7013.4559.7336.21
RSS Campaigns /wp-admin/edit.php?post_type=bm_newsletter_rss1,2223.3753.7346.49
Subscribers /wp-admin/edit.php?post_type=bm_subscriber1,1923.3645.9734.00
Add New /wp-admin/post-new.php?post_type=bm_newsletter2,1014.3990.55106.38
Newsletters /wp-admin/edit.php?post_type=bm_newsletter1,2503.4049.3531.70
Settings /wp-admin/edit.php?post_type=bm_newsletter&page=boldermail-settings9933.2841.1227.71
Automations /wp-admin/edit.php?post_type=bm_autoresponder1,1823.4646.3630.40
Lists /wp-admin/edit.php?post_type=bm_list1,2763.3848.3532.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • boldermail_previous_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • boldermail_active_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • boldermail_siteurl

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 items
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/boldermail/partials/template/html-boldermail-template-one-column-full-width.php
    • > /wp-content/plugins/boldermail/partials/template/html-boldermail-template-simple-text.php
    • > /wp-content/plugins/boldermail/partials/template/html-boldermail-template-one-column.php
    • > /wp-content/plugins/boldermail/partials/template/html-boldermail-template-one-column-rss.php
    • > /wp-content/plugins/boldermail/partials/template/html-boldermail-template-one-column-logo.php
    • > /wp-content/plugins/boldermail/partials/template/html-boldermail-template-one-column-full-width-rss.php
    • > /wp-content/plugins/boldermail/partials/template/html-boldermail-template-one-column-permalink-logo.php
    • > /wp-content/plugins/boldermail/partials/template/html-boldermail-template-simple-text-rss.php
  • 88× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Cron\\AbstractField' not found in wp-content/plugins/boldermail/includes/plugins/cron-expression/mtdowling/cron-expression/src/Cron/MonthField.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/symfony/css-selector/Parser/Handler/NumberHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/symfony/css-selector/Tests/Node/AbstractNodeTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Pelago\\Emogrifier\\HtmlProcessor\\AbstractHtmlProcessor' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/pelago/emogrifier/src/Emogrifier/CssInliner.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/symfony/css-selector/Tests/Parser/ParserTest.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/symfony/css-selector/Node/CombinedSelectorNode.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/symfony/css-selector/Parser/Handler/WhitespaceHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Exception\\ParseException' not found in wp-content/plugins/boldermail/includes/plugins/emogrifier/symfony/css-selector/Exception/ExpressionErrorException.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: email automation, email marketing, marketing automation, newsletter, email

boldermail/boldermail.php 85% from 13 tests

This is the main PHP file of "Boldermail – Email Marketing and Newsletters for WordPress" version 2.3.8, 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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 180 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected51,493 lines of code in 487 files:
LanguageFilesBlank linesComment linesLines of code
PHP2407,53113,02529,996
JavaScript1629531,19315,938
CSS74201332,544
Markdown1025501,101
HTML24770824
JSON2800641
Sass127369393
XML33146
YAML10010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.21
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces24
Interfaces7
Traits0
Classes182
▷ Abstract classes105.49%
▷ Concrete classes17294.51%
▷ Final classes31.74%
Methods1,347
▷ Static methods24117.89%
▷ Public methods1,08680.62%
▷ Protected methods876.46%
▷ Private methods17412.92%
Functions113
▷ Named functions9483.19%
▷ Anonymous functions1916.81%
Constants54
▷ Global constants916.67%
▷ Class constants4583.33%
▷ Public constants45100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
378 PNG files occupy 0.52MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/social/outline-dark-dribbble-48.png0.83KB0.62KB▼ 25.62%
assets/images/social/light-twitter-48.png0.88KB0.49KB▼ 43.94%
assets/images/social/outline-gray-dribbble-48.png1.25KB0.62KB▼ 50.39%
assets/images/social/outline-gray-vimeo-96.png2.05KB1.05KB▼ 48.52%
assets/images/social/outline-light-houzz-48.png0.72KB0.50KB▼ 30.07%