84% display-wp-mail-error-messages

Code Review | Display wp_mail Error Messages

WordPress plugin Display wp_mail Error Messages scored84%from 54 tests.

About plugin

  • Plugin page: display-wp-mail-e...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.5.3
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: Nov 24, 2020
  • Number of updates: 11
  • Update frequency: every 110.7 days
  • Top authors: wonderplugin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,245 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Display wp_mail Error Messages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.94 ▼9.04
Dashboard /wp-admin3.32 ▲0.0248.73 ▼0.56
Posts /wp-admin/edit.php3.37 ▲0.0148.86 ▼7.83
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.60 ▼16.82
Media Library /wp-admin/upload.php3.24 ▲0.0138.39 ▲0.53
Settings /wp-admin/admin.php?page=wonderplugin_wperror_edit_settings3.2132.97
Show Errors /wp-admin/admin.php?page=wonderplugin_wperror_overview3.2133.70

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Display wp_mail Error Messages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.10 ▼0.611.72 ▼0.3641.88 ▼2.56
Dashboard /wp-admin2,224 ▲475.56 ▼0.1085.17 ▼16.6866.86 ▲23.54
Posts /wp-admin/edit.php2,126 ▲261.99 ▲0.0038.80 ▲0.2537.22 ▲0.93
Add New Post /wp-admin/post-new.php1,563 ▲3523.20 ▲0.27706.96 ▲9.2554.44 ▲0.41
Media Library /wp-admin/upload.php1,429 ▲294.24 ▲0.0599.75 ▼6.0865.57 ▲18.48
Settings /wp-admin/admin.php?page=wonderplugin_wperror_edit_settings8352.0023.8726.23
Show Errors /wp-admin/admin.php?page=wonderplugin_wperror_overview8061.9924.5924.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/display-wp-mail-error-messages/wonderplugin-wperror.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: error messages, phpmailer, wp_mail

display-wp-mail-error-messages/wonderplugin-wperror.php 92% from 13 tests

"Display wp_mail Error Messages" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("display-wp-mail-error-messages.php" instead of "wonderplugin-wperror.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin101 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP137896
CSS1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
logo-16.png0.43KB0.40KB▼ 7.42%
logo-32.png0.69KB0.63KB▼ 8.78%