74% wp-mail-log

Code Review | WP Mail Log

WordPress plugin WP Mail Log scored74%from 54 tests.

About plugin

  • Plugin page: wp-mail-log
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 1, 2009
  • Latest release: Nov 18, 2023
  • Number of updates: 30
  • Update frequency: every 173.0 days
  • Top authors: wpvibes (93.33%)chmac (10%)

Code review

54 tests

User reviews

41 reviews

Install metrics

10,000+ active /78,593 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.17ms] Passed 4 tests

Server-side resources used by WP Mail Log
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0933.92 ▼5.49
Dashboard /wp-admin3.40 ▲0.1046.18 ▼5.29
Posts /wp-admin/edit.php3.52 ▲0.1647.13 ▲1.21
Add New Post /wp-admin/post-new.php6.06 ▲0.1895.04 ▲8.25
Media Library /wp-admin/upload.php3.33 ▲0.1036.13 ▲4.90

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: 1 new table, 7 new options
New tables
wp_wml_entries
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
wml_db_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Mail Log
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4214.28 ▼0.101.66 ▼0.2740.18 ▼5.43
Dashboard /wp-admin2,209 ▲325.59 ▼0.0393.02 ▼1.5843.32 ▼3.70
Posts /wp-admin/edit.php2,114 ▲112.02 ▲0.0140.07 ▲2.9535.60 ▼0.63
Add New Post /wp-admin/post-new.php1,538 ▲1223.10 ▼0.19644.90 ▲13.4956.62 ▲5.60
Media Library /wp-admin/upload.php1,417 ▲234.17 ▼0.0796.54 ▼2.2441.30 ▼1.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wml_entries
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • wml_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wp-mail-log/classes/api.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WML\\add_action() in wp-content/plugins/wp-mail-log/includes/bootstrap.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: email, mail log, capture emails, mail, logs...

wp-mail-log/wp-mail-log.php 92% from 13 tests

The main PHP file in "WP Mail Log" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • 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

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 plugin1,038 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7193487823
CSS241142
JavaScript10941
SVG10118
HTML11014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.17
▷ Minimum class complexity3.00
▷ Maximum class complexity39.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods46
▷ Static methods715.22%
▷ Public methods4291.30%
▷ Protected methods12.17%
▷ Private methods36.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin