68% mmailer

Code Review | Mailer

WordPress plugin Mailer scored68%from 54 tests.

About plugin

  • Plugin page: mmailer
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2013
  • Latest release: Jan 22, 2014
  • Number of updates: 11
  • Update frequency: every 8.4 days
  • Top authors: slaughterlt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,442 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.93MB] [CPU: ▼36.24ms] Passed 4 tests

An overview of server-side resources used by Mailer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0646.06 ▲1.41
Dashboard /wp-admin3.03 ▼0.3226.72 ▼41.17
Posts /wp-admin/edit.php3.03 ▼0.3329.78 ▼17.33
Add New Post /wp-admin/post-new.php3.03 ▼2.8624.64 ▼79.03
Media Library /wp-admin/upload.php3.03 ▼0.2029.72 ▼7.42
Options /wp-admin/admin.php?page=mmailer-options3.0328.95
Start mail /wp-admin/admin.php?page=mmailer-start-mail3.0325.87
MMailer /wp-admin/admin.php?page=MMailer-options3.0328.29
Reset sending /wp-admin/admin.php?page=mmailer-reset-sending3.0324.74
Stop sending /wp-admin/admin.php?page=mmailer-stop-sending3.0329.71

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Mailer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.30 ▼1.484.54 ▲2.5945.07 ▲1.97
Dashboard /wp-admin2,242 ▲544.83 ▼1.05113.74 ▼2.0439.16 ▼5.07
Posts /wp-admin/edit.php2,128 ▲362.06 ▲0.0442.15 ▼4.6736.29 ▼0.41
Add New Post /wp-admin/post-new.php1,545 ▲2617.69 ▼5.46690.07 ▲33.6357.18 ▲6.74
Media Library /wp-admin/upload.php1,430 ▲394.14 ▼0.09105.58 ▲1.5246.40 ▲0.22
Options /wp-admin/admin.php?page=mmailer-options1,5816.61128.8257.77
Start mail /wp-admin/admin.php?page=mmailer-start-mail7802.0325.1324.82
MMailer /wp-admin/admin.php?page=MMailer-options8372.0930.3135.34
Reset sending /wp-admin/admin.php?page=mmailer-reset-sending7832.0524.7423.59
Stop sending /wp-admin/admin.php?page=mmailer-stop-sending7982.0223.6426.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mmailer-stop-sending
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
    • > GET request to /wp-admin/admin.php?page=mmailer-options
    • > Notice in wp-content/plugins/mmailer/plugin.php+120
    Undefined index: Save
    • > GET request to /wp-admin/admin.php?page=mmailer-options
    • > Notice in wp-content/plugins/mmailer/plugin.php+218
    Undefined variable: to
    • > GET request to /wp-admin/admin.php?page=mmailer-options
    • > Notice in wp-content/plugins/mmailer/plugin.php+157
    Undefined variable: txt2

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mmailer/plugin.php:12

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (First screen), #2 (Options screen)
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

mmailer/plugin.php 92% from 13 tests

The main file in "Mailer" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mmailer.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected236 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13821236

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png36.35KB18.68KB▼ 48.62%
screenshot-2.png51.70KB27.81KB▼ 46.21%