84% mail2users

Code Review | Mail to Users

WordPress plugin Mail to Users scored84%from 54 tests.

About plugin

  • Plugin page: mail2users
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7
  • WordPress version: 6.3.1
  • First release: Jan 8, 2017
  • Latest release: Mar 27, 2017
  • Number of updates: 61
  • Update frequency: every 2.1 days
  • Top authors: miraclewebssoft (98.36%)Otto42 (3.28%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /2,214 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.60ms] Passed 4 tests

This is a short check of server-side resources used by Mail to Users
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0635.53 ▼9.17
Dashboard /wp-admin3.39 ▲0.0846.41 ▼0.12
Posts /wp-admin/edit.php3.50 ▲0.1448.42 ▲4.99
Add New Post /wp-admin/post-new.php5.99 ▲0.0991.47 ▼2.91
Media Library /wp-admin/upload.php3.31 ▲0.0835.25 ▲1.81
Thanks /wp-admin/admin.php?page=thanks_handle3.2628.29
Settings /wp-admin/admin.php?page=Settings_handle3.2936.53
Unsubscribed Users /wp-admin/admin.php?page=Unsubscribed_handle3.2830.10
Mail to users /wp-admin/admin.php?page=mail2users_handler3.3639.47

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

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

Browser metrics Passed 4 tests

Mail to Users: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.60 ▼0.601.78 ▼1.0739.53 ▼4.58
Dashboard /wp-admin2,240 ▲584.94 ▼0.8899.12 ▼8.7670.96 ▲31.57
Posts /wp-admin/edit.php2,126 ▲342.04 ▼0.0137.17 ▼1.5535.20 ▼0.09
Add New Post /wp-admin/post-new.php6,647 ▲5,12729.24 ▲6.04911.87 ▲226.6768.17 ▲8.88
Media Library /wp-admin/upload.php1,425 ▲374.22 ▼0.03103.52 ▼11.3246.14 ▼1.31
Thanks /wp-admin/admin.php?page=thanks_handle7951.7425.1321.21
Settings /wp-admin/admin.php?page=Settings_handle1,0631.7428.4126.55
Unsubscribed Users /wp-admin/admin.php?page=Unsubscribed_handle8231.7123.9325.89
Mail to users /wp-admin/admin.php?page=mail2users_handler1,6136.48128.62101.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=thanks_handle
    • > Notice in wp-content/plugins/mail2users/mail2users.php+71
    Undefined index: mail2users-editor-id
    • > GET request to /wp-admin/admin.php?page=thanks_handle
    • > Notice in wp-content/plugins/mail2users/mail2users.php+72
    Undefined index: mail2users-subject
    • > GET request to /wp-admin/admin.php?page=thanks_handle
    • > Notice in wp-content/plugins/mail2users/mail2users.php+73
    Undefined index: mail2users-attachment
    • > GET request to /wp-admin/admin.php?page=thanks_handle
    • > Notice in wp-content/plugins/mail2users/mail2users.php+74
    Undefined index: mail2users-cc
    • > GET request to /wp-admin/admin.php?page=thanks_handle
    • > Notice in wp-content/plugins/mail2users/mail2users.php+75
    Undefined index: mail2users-from

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for 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
Please take inspiration from this readme.txt

mail2users/mail2users.php 92% from 13 tests

The main PHP file in "Mail to Users" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)

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 plugin270 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP56924268
CSS1001
JavaScript1001

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.23
Average class complexity16.50
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
5 PNG files occupy 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/icon.png3.52KB0.98KB▼ 72.10%
assets/image/simple-mail.png47.55KB15.79KB▼ 66.79%
assets/image/single.png2.26KB1.60KB▼ 29.35%
assets/image/up.png0.46KB0.21KB▼ 54.68%
assets/image/formatted-mail.png137.74KB46.35KB▼ 66.35%