73% rtm-mail-wp-mail-logger

Code Review | WP Mail Logger

WordPress plugin WP Mail Logger scored73%from 54 tests.

About plugin

  • Plugin page: rtm-mail-wp-mail-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2022
  • Latest release: Mar 2, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: appsrtmbusiness (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,442 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.49ms] Passed 4 tests

Server-side resources used by WP Mail Logger
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.23 ▼0.12
Dashboard /wp-admin3.46 ▲0.1144.16 ▼19.71
Posts /wp-admin/edit.php3.51 ▲0.1546.33 ▲0.66
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.84 ▼2.80
Media Library /wp-admin/upload.php3.32 ▲0.0935.83 ▲2.39
Dashboard /wp-admin/admin.php?page=rtm-mail-dashboard3.5136.58
Debug Events /wp-admin/admin.php?page=rtm-mail-events3.3431.56
Settings /wp-admin/admin.php?page=rtm-mail-settings3.3731.01
Details /wp-admin/admin.php?page=rtm-mail-details3.3932.37
Overview /wp-admin/admin.php?page=rtm-mail-overview3.4532.06
Mail SMTP /wp-admin/admin.php?page=rtm-mail-mailsmtp3.3633.57

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 333 new files
Database: 1 new table, 10 new options
New tables
wp_rtm_mail_logs
New WordPress options
rtm_mail_migration_version
rtm_mail_smtp_settings
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
rtm_mail_smtp_key
widget_recent-posts
rtm_mail_settings
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

WP Mail Logger: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.31 ▼1.071.72 ▲0.0638.67 ▼1.97
Dashboard /wp-admin2,245 ▲605.84 ▲0.95102.80 ▼0.9437.13 ▼4.63
Posts /wp-admin/edit.php2,128 ▲392.02 ▼0.0040.45 ▲5.6334.77 ▼2.94
Add New Post /wp-admin/post-new.php1,573 ▲3117.89 ▼0.67595.42 ▼49.1847.71 ▼3.37
Media Library /wp-admin/upload.php1,427 ▲394.26 ▲0.0894.94 ▼7.9642.07 ▼3.67
Dashboard /wp-admin/admin.php?page=rtm-mail-dashboard1,4432.2134.5780.41
Debug Events /wp-admin/admin.php?page=rtm-mail-events1,0302.0939.2439.02
Settings /wp-admin/admin.php?page=rtm-mail-settings1,5902.2330.2449.92
Details /wp-admin/admin.php?page=rtm-mail-details8312.0825.6921.92
Overview /wp-admin/admin.php?page=rtm-mail-overview1,4962.5132.0627.30
Mail SMTP /wp-admin/admin.php?page=rtm-mail-mailsmtp1,1652.3228.5437.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_rtm_mail_logs
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • rtm_mail_smtp_key
    • rtm_mail_migration_version
    • rtm_mail_smtp_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 221× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/rtm-mail-wp-mail-logger/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php:20

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

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: mailer, wordpress logger, wordpress smtp, mail logger, logger...

rtm-mail-wp-mail-logger/rtm-mail.php 77% from 13 tests

"WP Mail Logger" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rtm-mail-wp-mail-logger.php" instead of "rtm-mail.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 168 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
Everything looks great! No dangerous files found in this plugin17,956 lines of code in 315 files:
LanguageFilesBlank linesComment linesLines of code
PHP2863,4477,07713,845
JSON9001,884
CSS1276131,161
Markdown92830684
JavaScript33010214
YAML5300118
XML22050

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.65
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces24
Interfaces16
Traits6
Classes249
▷ Abstract classes93.61%
▷ Concrete classes24096.39%
▷ Final classes187.50%
Methods981
▷ Static methods606.12%
▷ Public methods69470.74%
▷ Protected methods18218.55%
▷ Private methods10510.70%
Functions62
▷ Named functions46.45%
▷ Anonymous functions5893.55%
Constants117
▷ Global constants54.27%
▷ Class constants11295.73%
▷ Public constants112100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.50MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png19.66KB9.73KB▼ 50.53%
assets/images/rtm-logo.png10.07KB3.83KB▼ 61.94%
assets/images/event-overview.png251.04KB79.95KB▼ 68.15%
assets/images/event-details.png222.49KB64.38KB▼ 71.06%
assets/images/logo-icon.png11.28KB5.54KB▼ 50.92%