83% mailin

Code Review | Newsletter, SMTP, Email marketing and Subscribe forms by Brevo (formely Sendinblue)

WordPress plugin Newsletter, SMTP, Email marketing and Subscribe forms by Brevo (formely Sendinblue) scored83%from 54 tests.

About plugin

  • Plugin page: mailin
  • Plugin version: 3.1.72
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Sep 6, 2012
  • Latest release: Nov 30, 2023
  • Number of updates: 278
  • Update frequency: every 14.8 days
  • Top authors: neeraj_slit (62.59%)amarsib (18.71%)gouravgupta24 (8.27%)DragonOfDev (5.76%)ksendinblue (2.52%)

Code review

54 tests

User reviews

233 reviews

Install metrics

100,000+ active /3,940,394 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.11MB] [CPU: ▲10.52ms] Passed 4 tests

A check of server-side resources used by Newsletter, SMTP, Email marketing and Subscribe forms by Brevo (formely Sendinblue)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.60 ▲1.1453.21 ▲11.92
Dashboard /wp-admin4.44 ▲1.1459.22 ▲11.53
Posts /wp-admin/edit.php4.49 ▲1.1358.92 ▲11.42
Add New Post /wp-admin/post-new.php6.96 ▲1.0891.37 ▲7.21
Media Library /wp-admin/upload.php4.31 ▲1.0847.70 ▲16.40

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 221 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
sib_token_store
sib_service_worker_install_exception
db_upgraded
can_compress_scripts
sib_use_apiv2
sib_home_option
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Newsletter, SMTP, Email marketing and Subscribe forms by Brevo (formely Sendinblue): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲19013.65 ▼0.669.16 ▲6.8741.96 ▼3.00
Dashboard /wp-admin2,227 ▲495.78 ▲0.0892.11 ▼5.7386.02 ▲46.33
Posts /wp-admin/edit.php2,150 ▲502.25 ▲0.2740.74 ▼0.6237.36 ▼0.52
Add New Post /wp-admin/post-new.php1,571 ▲4223.03 ▼0.15724.62 ▲94.8539.86 ▼13.83
Media Library /wp-admin/upload.php1,444 ▲444.44 ▲0.2995.67 ▼3.4970.34 ▲30.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_recent-comments
    • theysaidso_admin_options
    • sib_main_option
    • widget_theysaidso_widget
    • sib_use_apiv2
    • can_compress_scripts
    • sib_home_option
    • widget_recent-posts
    • sib_token_store
    • db_upgraded
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/mailin/inc/table-forms.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/mailin/sendinblue.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/mailin/inc/sib-form-preview.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mailin/widget/widget_form.php:12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mailin/inc/table-forms.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/mailin/inc/table-forms.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/mailin/inc/function.wp_mail.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add images for these screenshots: #1 (First, your are invited to create an account on Brevo then enter your API keys), #2 (The Homepage gives you an overall view over your campaigns and allows you to activate Brevo SMTP for all transactional emails and Marketing Automation to better target your customers), #3 (The Forms page gives you access to your forms list), #4 (When you click on a specific form, you can configure your sign up process and customize it), #5 (The Statistics page gives you a global view over your performance: delivered, opened, clicked, etc.)
You can look at the official readme.txt

mailin/sendinblue.php 92% from 13 tests

The main PHP script in "Newsletter, SMTP, Email marketing and Subscribe forms by Brevo (formely Sendinblue)" version 3.1.72 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mailin.php" instead of "sendinblue.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 plugin31,335 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
CSS101,7894911,508
JavaScript72,5621,1899,722
PHP217371,2275,755
Sass1319221,158
LESS1319311,149
SVG200792
PO File1311470711
HTML740540

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity38.12
▷ Minimum class complexity1.00
▷ Maximum class complexity167.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods237
▷ Static methods11548.52%
▷ Public methods22795.78%
▷ Protected methods00.00%
▷ Private methods104.22%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants42
▷ Global constants00.00%
▷ Class constants42100.00%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
116 compressed PNG files occupy 1.91MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/flags/cn.png0.41KB0.46KB0.00%
img/flags/no.png0.37KB0.39KB0.00%
img/flags/mg.png0.31KB0.37KB0.00%
img/flags/sk.png0.41KB0.46KB0.00%
img/flags/pk.png0.52KB0.63KB0.00%