77% mailersend-transactional-emails-for-woocommerce

Code Review | MailerSend - Transactional emails for WooCommerce

WordPress plugin MailerSend - Transactional emails for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: mailersend-transa...
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.4 or Latest+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2021
  • Latest release: Jul 17, 2023
  • Number of updates: 15
  • Update frequency: every 48.0 days
  • Top authors: mailersend (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,738 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼3.59ms] Passed 4 tests

This is a short check of server-side resources used by MailerSend - Transactional emails for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.71 ▲10.67
Dashboard /wp-admin3.31 ▼0.0442.83 ▼17.53
Posts /wp-admin/edit.php3.36 ▲0.0049.18 ▲2.23
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.62 ▲3.13
Media Library /wp-admin/upload.php3.23 ▲0.0033.97 ▼2.17
MailerSend /wp-admin/admin.php?page=mailersend-woocommerce3.0021.98

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by MailerSend - Transactional emails for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.381.52 ▼0.3239.29 ▼4.47
Dashboard /wp-admin2,206 ▲214.86 ▼0.0396.75 ▼23.5937.77 ▼6.85
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0639.99 ▲2.4734.52 ▲1.65
Add New Post /wp-admin/post-new.php1,544 ▲818.45 ▼4.40629.59 ▼25.4450.10 ▼0.82
Media Library /wp-admin/upload.php1,388 ▼34.26 ▲0.07100.74 ▲0.4143.74 ▼3.11
MailerSend /wp-admin/admin.php?page=mailersend-woocommerce280.440.063.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_help_tip() in wp-content/plugins/mailersend-transactional-emails-for-woocommerce/admin/views/mailersend-woocommerce-admin-settings-display.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=mailersend-woocommerce
    • > Network (severe)
    wp-admin/admin.php?page=mailersend-woocommerce - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === mailersend-transactional-emails-for-woocommerce === )
Please take inspiration from this readme.txt

mailersend-transactional-emails-for-woocommerce/mailersend-woocommerce.php 69% from 13 tests

The entry point to "MailerSend - Transactional emails for WooCommerce" version 1.2.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.7" instead of "5.1.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("mailersend-transactional-emails-for-woocommerce.php" instead of "mailersend-woocommerce.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires PHP: Periods and digits should be used for the required version number (ex. "7.0" instead of "7.4 or Latest")

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 plugin1,971 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP105514171,570
CSS2985176
JavaScript18426163
Markdown130062

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.12
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods36.98%
▷ Public methods3581.40%
▷ Protected methods00.00%
▷ Private methods818.60%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/css/close_btn.png0.71KB0.62KB▼ 13.82%