78% wp-mail-catcher

Code Review | Mail logging - WP Mail Catcher

WordPress plugin Mail logging - WP Mail Catcher scored78%from 54 tests.

About plugin

  • Plugin page: wp-mail-catcher
  • Plugin version: 2.1.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Dec 20, 2017
  • Latest release: Nov 25, 2023
  • Number of updates: 85
  • Update frequency: every 25.7 days
  • Top authors: Wardee (100%)

Code review

54 tests

User reviews

91 reviews

Install metrics

10,000+ active /140,558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▲2.20ms] Passed 4 tests

A check of server-side resources used by Mail logging - WP Mail Catcher
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3239.86 ▲1.41
Dashboard /wp-admin3.61 ▲0.3046.49 ▲1.59
Posts /wp-admin/edit.php3.66 ▲0.3049.99 ▲6.17
Add New Post /wp-admin/post-new.php6.15 ▲0.2694.34 ▲0.17
Media Library /wp-admin/upload.php3.47 ▲0.2437.41 ▲5.62
Settings /wp-admin/admin.php?page=wp-mail-catcher-settings3.4734.50
WP Mail Catcher /wp-admin/admin.php?page=wp-mail-catcher3.6942.18

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 47 new files
Database: 1 new table, 6 new options
New tables
wp_mail_catcher_logs
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Mail logging - WP Mail Catcher
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8714.34 ▼0.381.86 ▲0.3440.08 ▲0.75
Dashboard /wp-admin2,223 ▲425.62 ▼0.1086.18 ▼26.7340.41 ▼2.14
Posts /wp-admin/edit.php2,134 ▲371.99 ▼0.0940.49 ▼0.0235.22 ▼0.59
Add New Post /wp-admin/post-new.php1,555 ▲2923.47 ▲0.29619.93 ▼49.7747.97 ▼0.97
Media Library /wp-admin/upload.php1,437 ▲404.19 ▼0.0195.29 ▼7.4141.56 ▼3.77
Settings /wp-admin/admin.php?page=wp-mail-catcher-settings1,6011.6932.1929.94
WP Mail Catcher /wp-admin/admin.php?page=wp-mail-catcher2,0956.77138.8565.91

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

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 everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-mail-catcher/src/Views/TextMessage.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'WpMailCatcher\\Loggers\\LogHelper' not found in wp-content/plugins/wp-mail-catcher/src/Loggers/BuddyPress.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WpMailCatcher\\GeneralHelper' not found in wp-content/plugins/wp-mail-catcher/src/Views/HtmlMessage.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WpMailCatcher\\DatabaseUpgradeManager' not found in wp-content/plugins/wp-mail-catcher/src/Views/Log.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WpMailCatcher\\GeneralHelper' not found in wp-content/plugins/wp-mail-catcher/src/Views/NewMessageModal.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-mail-catcher/src/MailAdminTable.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WpMailCatcher\\admin_url() in wp-content/plugins/wp-mail-catcher/src/GeneralHelper.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'WpMailCatcher\\GeneralHelper' not found in wp-content/plugins/wp-mail-catcher/src/Views/Footer.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WpMailCatcher\\Models\\Settings' not found in wp-content/plugins/wp-mail-catcher/src/Views/Settings.php:7
    • > PHP Fatal error
      Trait 'WpMailCatcher\\Loggers\\LogHelper' not found in wp-content/plugins/wp-mail-catcher/src/Loggers/WpMail.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: email logger, crm, logging, email logging, mail...

wp-mail-catcher/WpMailCatcher.php 77% from 13 tests

"Mail logging - WP Mail Catcher" version 2.1.6'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:
  • Description: The description should be shorter than 140 characters (currently 178 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-mail-catcher.php" instead of "WpMailCatcher.php")

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 plugin2,892 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP365475272,680
PO File16364176
JSON20034
CSS1001
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity14.48
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces5
Interfaces1
Traits1
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods137
▷ Static methods6345.99%
▷ Public methods12289.05%
▷ Protected methods32.19%
▷ Private methods128.76%
Functions16
▷ Named functions00.00%
▷ Anonymous functions16100.00%
Constants0
▷ Global constants00.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
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
assets/file-icon.png1.15KB0.20KB▼ 82.45%