78% mailrelay

Code Review | Mailrelay

WordPress plugin Mailrelay scored78%from 54 tests.

About plugin

  • Plugin page: mailrelay
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2013
  • Latest release: Oct 24, 2023
  • Number of updates: 45
  • Update frequency: every 88.9 days
  • Top authors: mailrelay (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /24,488 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.08MB] [CPU: ▼8.15ms] Passed 4 tests

Analyzing server-side resources used by Mailrelay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.29 ▼9.82
Dashboard /wp-admin3.41 ▲0.0747.97 ▼5.04
Posts /wp-admin/edit.php3.53 ▲0.1743.00 ▲3.10
Add New Post /wp-admin/post-new.php6.00 ▲0.1179.98 ▼18.17
Media Library /wp-admin/upload.php3.34 ▲0.1133.55 ▲0.44

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Mailrelay
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.36 ▼0.141.68 ▲0.0143.50 ▼3.46
Dashboard /wp-admin2,198 ▲185.52 ▼0.1596.75 ▲6.1367.72 ▲29.40
Posts /wp-admin/edit.php2,112 ▲122.02 ▲0.0133.81 ▼8.4832.73 ▼5.32
Add New Post /wp-admin/post-new.php6,212 ▲4,67519.63 ▲1.45911.84 ▲295.2238.52 ▼26.01
Media Library /wp-admin/upload.php1,415 ▲124.22 ▼0.0193.43 ▼4.2470.15 ▲29.53

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mailrelay/mailrelay.php
    • > /wp-content/plugins/mailrelay/inc/global-hooks.php
    • > /wp-content/plugins/mailrelay/inc/class-mailrelaypages.php
    • > /wp-content/plugins/mailrelay/inc/common.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mailrelay/inc/class-mailrelay-wpforms.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mailrelay/inc/block-widgets.php:27

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 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

mailrelay/mailrelay.php 92% from 13 tests

This is the main PHP file of "Mailrelay" version 2.1.3, 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 name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,164 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP616334796
PO File25878187
JavaScript1160107
Markdown230060
CSS25014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity33.00
▷ Minimum class complexity9.00
▷ Maximum class complexity57.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2692.86%
▷ Protected methods27.14%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
mailrelay.png0.37KB0.23KB▼ 38.48%