10% wp-mail

Code Review | WP Mail

WordPress plugin WP Mail scored10%from 54 tests.

About plugin

  • Plugin page: wp-mail
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2016
  • Latest release: Oct 6, 2016
  • Number of updates: 17
  • Update frequency: every 4.6 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /5,162 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wp-mail/wp-mail.php+26
    date_default_timezone_set(): Timezone ID '' is invalid

Server metrics [RAM: ▼1.78MB] [CPU: ▼53.23ms] Passed 4 tests

This is a short check of server-side resources used by WP Mail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.255.06 ▼33.16
Dashboard /wp-admin2.23 ▼1.076.08 ▼47.95
Posts /wp-admin/edit.php2.23 ▼1.126.71 ▼39.14
Add New Post /wp-admin/post-new.php2.23 ▼3.657.23 ▼92.68
Media Library /wp-admin/upload.php2.23 ▼1.004.89 ▼30.85
Shortcodes /wp-admin/admin.php?page=wp_mail_shortcodes2.235.45
Compose /wp-admin/admin.php?page=wp_mail_compose2.237.87
View Message /wp-admin/admin.php?page=wp_mail_view_message2.237.15
Inbox 0 /wp-admin/admin.php?page=wp_mail_inbox2.236.95
Trashed /wp-admin/admin.php?page=wp_trashed_mails2.235.72
WP Mail /wp-admin/options-general.php?page=wp_mail_settings2.235.72
Draft /wp-admin/admin.php?page=wp_draft_mails2.235.73
Sent Messages /wp-admin/admin.php?page=wp_sent_mails2.237.05
WP Mail /wp-admin/admin.php?page=wp_mail_dash2.235.73

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 65 new files
Database: 1 new table, 7 new options
New tables
wp_mail_system
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
wp_mail_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Mail
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9714.80 ▲0.432.41 ▲0.4244.09 ▲2.83
Dashboard /wp-admin2,241 ▲535.84 ▲0.9296.01 ▼9.1387.51 ▲44.48
Posts /wp-admin/edit.php2,127 ▲382.01 ▲0.0234.71 ▼2.6334.08 ▼0.18
Add New Post /wp-admin/post-new.php1,701 ▲18121.93 ▼1.37757.37 ▲74.2450.86 ▼1.00
Media Library /wp-admin/upload.php1,423 ▲324.20 ▼0.07100.85 ▼1.6772.69 ▲28.78
Shortcodes /wp-admin/admin.php?page=wp_mail_shortcodes8602.0627.4780.61
Compose /wp-admin/admin.php?page=wp_mail_compose1,6896.75144.58157.26
View Message /wp-admin/admin.php?page=wp_mail_view_message1,6133.0439.0943.99
Inbox 0 /wp-admin/admin.php?page=wp_mail_inbox9602.2532.0638.50
Trashed /wp-admin/admin.php?page=wp_trashed_mails9602.2431.6436.08
WP Mail /wp-admin/options-general.php?page=wp_mail_settings8982.1924.6822.51
Draft /wp-admin/admin.php?page=wp_draft_mails9492.2431.3034.31
Sent Messages /wp-admin/admin.php?page=wp_sent_mails9482.2532.2934.51
WP Mail /wp-admin/admin.php?page=wp_mail_dash9542.2531.6238.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-mail/wp-mail.php+26
    date_default_timezone_set(): Timezone ID '' is invalid
  • Zombie tables detected upon uninstall: 1 table
    • wp_mail_system
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • wp_mail_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_mail_dash
    • > Notice in wp-content/plugins/wp-mail/wp-mail.php+26
    date_default_timezone_set(): Timezone ID '' is invalid
    • > GET request to /wp-admin/admin.php?page=wp_mail_view_message
    • > Notice in wp-content/plugins/wp-mail/inc/view_message.php+2
    Undefined index: mid
    • > GET request to /wp-admin/admin.php?page=wp_mail_view_message
    • > Notice in wp-content/plugins/wp-mail/inc/view_message.php+2
    Undefined index: view

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-mail/wp-mail.php:26

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-mail/wp-mail.php Passed 13 tests

The main PHP script in "WP Mail" version 1.3 is automatically included on every request by WordPress
67 characters long description:
User can send and receive emails or messages on a Wordpress Network

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 plugin16,626 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS5226310,972
JavaScript103902633,205
PHP13381131,348
SVG200928
HTML12719173

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods1241.38%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.04MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/icon.png0.35KB0.33KB▼ 6.16%
inc/img/bg.png38.08KB28.53KB▼ 25.08%
inc/img/icheck/grey.png1.12KB1.45KB0.00%
inc/img/icheck/grey@2x.png1.37KB2.66KB0.00%