68% wb-mail-logger

Code Review | Wb Mail Logger

WordPress plugin Wb Mail Logger scored68%from 54 tests.

About plugin

  • Plugin page: wb-mail-logger
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2021
  • Latest release: Sep 17, 2023
  • Number of updates: 6
  • Update frequency: every 128.0 days
  • Top authors: webbuilder143 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /542 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.09MB] [CPU: ▼9.67ms] Passed 4 tests

Server-side resources used by Wb Mail Logger
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.27 ▼18.80
Dashboard /wp-admin3.39 ▲0.0947.27 ▼11.56
Posts /wp-admin/edit.php3.51 ▲0.1549.27 ▼2.66
Add New Post /wp-admin/post-new.php5.97 ▲0.0999.02 ▼5.65
Media Library /wp-admin/upload.php3.31 ▲0.0934.30 ▼0.76
Mail Log /wp-admin/tools.php?page=wb-mail-logger3.3334.11

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: 1 new table, 6 new options
New tables
wp_wb_mlr_data
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Wb Mail Logger
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.56 ▼0.731.64 ▼0.6238.71 ▼5.88
Dashboard /wp-admin2,210 ▲225.89 ▲0.03105.66 ▼12.0740.95 ▼2.03
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0340.00 ▲2.4434.07 ▼1.10
Add New Post /wp-admin/post-new.php1,546 ▲1218.24 ▼4.93599.82 ▼45.9749.42 ▼20.49
Media Library /wp-admin/upload.php1,395 ▲44.16 ▼0.0396.88 ▼5.3542.33 ▼0.85
Mail Log /wp-admin/tools.php?page=wb-mail-logger9242.0725.7126.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wb_mlr_data
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wb-mail-logger/admin/partials/_detail-view.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wb-mail-logger/admin/partials/wb-mail-logger-admin-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
Please take inspiration from this readme.txt

wb-mail-logger/wb-mail-logger.php 92% from 13 tests

The primary PHP file in "Wb Mail Logger" version 1.0.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin682 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11149454590
JavaScript113074
CSS10018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods39
▷ Static methods410.26%
▷ Public methods2871.79%
▷ Protected methods00.00%
▷ Private methods1128.21%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected