74% wp-mail-logging

Code Review | WP Mail Logging

WordPress plugin WP Mail Logging scored74%from 54 tests.

About plugin

  • Plugin page: wp-mail-logging
  • Plugin version: 1.12.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2014
  • Latest release: Jun 21, 2023
  • Number of updates: 141
  • Update frequency: every 23.4 days
  • Top authors: No3x (73.05%)tautvidas (13.48%)wysija (11.35%)capuderg (4.26%)

Code review

54 tests

User reviews

201 reviews

Install metrics

200,000+ active /2,216,371 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.02MB] [CPU: ▲3.89ms] Passed 4 tests

This is a short check of server-side resources used by WP Mail Logging
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.52 ▲1.0646.33 ▲7.09
Dashboard /wp-admin4.35 ▲1.0552.83 ▲4.36
Posts /wp-admin/edit.php4.40 ▲1.0558.62 ▲4.93
Add New Post /wp-admin/post-new.php6.87 ▲0.9888.49 ▼0.84
Media Library /wp-admin/upload.php4.21 ▲0.9844.71 ▲9.26
SMTP /wp-admin/admin.php?page=wpml_plugin_log&tab=smtp4.2241.56
Settings /wp-admin/admin.php?page=wpml_plugin_log&tab=settings4.2141.48
Email Log /wp-admin/admin.php?page=wpml_plugin_log4.2943.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 132 new files
Database: 1 new table, 9 new options
New tables
wp_wpml_mails
New WordPress options
wp_mail_logging_activated_time
widget_theysaidso_widget
db_upgraded
WPML_Plugin__version
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
wp_mail_logging_user_feedback_notice

Browser metrics Passed 4 tests

An overview of browser requirements for WP Mail Logging
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲9113.30 ▼1.004.47 ▲2.4239.48 ▼2.93
Dashboard /wp-admin2,254 ▲634.87 ▼0.18105.46 ▲1.8539.97 ▼7.35
Posts /wp-admin/edit.php2,137 ▲482.03 ▲0.0340.77 ▼0.6034.65 ▼1.37
Add New Post /wp-admin/post-new.php1,563 ▲2723.48 ▲0.11663.36 ▼4.2452.72 ▼2.14
Media Library /wp-admin/upload.php1,439 ▲514.21 ▼0.0495.50 ▼5.0642.49 ▼0.32
SMTP /wp-admin/admin.php?page=wpml_plugin_log&tab=smtp9981.8925.2441.53
Settings /wp-admin/admin.php?page=wpml_plugin_log&tab=settings1,5661.8028.9239.42
Email Log /wp-admin/admin.php?page=wpml_plugin_log1,3301.7727.6937.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wpml_mails
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • wp_mail_logging_activated_time
    • theysaidso_admin_options
    • wp_mail_logging_user_feedback_notice
    • WPML_Plugin__version

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 everything seems fine, this is not 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
Please take a closer look at the following
  • 33× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-mail-logging/lib/vendor/brandonwamboldt/wp-orm/wp-orm.php on line 13
    • > PHP Fatal error
      Uncaught Error: Interface 'No3x\\WPML\\ORM\\ModelInterface' not found in wp-content/plugins/wp-mail-logging/lib/vendor/brandonwamboldt/wp-orm/src/BaseModel.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'No3x\\WPML\\ORM\\BaseModel' not found in wp-content/plugins/wp-mail-logging/lib/vendor/brandonwamboldt/wp-orm/src/Model/Post.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'No3x\\WPML\\Renderer\\Format\\HeadingsRenderer' not found in wp-content/plugins/wp-mail-logging/src/Renderer/Format/RawRenderer.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-mail-logging/src/inc/Helpers/PluginSilentUpgraderSkin.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/wp-mail-logging/src/inc/Helpers/PluginSilentUpgrader.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'No3x\\WPML\\ORM\\BaseModel' not found in wp-content/plugins/wp-mail-logging/lib/vendor/brandonwamboldt/wp-orm/src/Model/User.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'No3x\\WPML\\IHooks' not found in wp-content/plugins/wp-mail-logging/src/Renderer/WPML_MailRenderer_AJAX_Handler.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'No3x\\WPML\\Renderer\\Column\\GenericColumn' not found in wp-content/plugins/wp-mail-logging/src/Renderer/Column/SubjectColumn.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'No3x\\WPML\\Renderer\\Column\\GenericColumn' not found in wp-content/plugins/wp-mail-logging/src/Renderer/Column/TimestampColumn.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

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

"WP Mail Logging" version 1.12.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
34 characters long description:
Logs each email sent by WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin9,800 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
PHP772,1284,6677,111
CSS1022171,847
JavaScript10135164468
PO File2169211362
SVG120012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.30
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces15
Interfaces8
Traits0
Classes62
▷ Abstract classes58.06%
▷ Concrete classes5791.94%
▷ Final classes00.00%
Methods550
▷ Static methods6010.91%
▷ Public methods41475.27%
▷ Protected methods5510.00%
▷ Private methods8114.73%
Functions27
▷ Named functions414.81%
▷ Anonymous functions2385.19%
Constants80
▷ Global constants33.75%
▷ Class constants7796.25%
▷ Public constants77100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 compressed PNG files occupy 0.49MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/smtp/screenshot-full.png71.38KB72.60KB0.00%
assets/images/smtp/wpmailsmtp-logo@2x.png13.65KB8.91KB▼ 34.72%
assets/images/prod-edu/reports.png73.50KB75.92KB0.00%
assets/images/plane-bg@2x.png3.49KB3.49KB0.00%
assets/images/prod-edu/archive.png120.74KB126.80KB0.00%