74% bounce-handler-mailpoet

Code Review | Bounce Handler MailPoet 3

WordPress plugin Bounce Handler MailPoet 3 scored74%from 54 tests.

About plugin

  • Plugin page: bounce-handler-ma...
  • Plugin version: 1.3.21
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2017
  • Latest release: Oct 1, 2020
  • Number of updates: 66
  • Update frequency: every 18.0 days
  • Top authors: ehsantikweb (87.88%)Kasperta (13.64%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /43,642 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.73ms] Passed 4 tests

An overview of server-side resources used by Bounce Handler MailPoet 3
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.84 ▼1.11
Dashboard /wp-admin3.32 ▼0.0349.48 ▼12.97
Posts /wp-admin/edit.php3.37 ▲0.0154.30 ▲4.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.99 ▼18.25
Media Library /wp-admin/upload.php3.24 ▲0.0137.46 ▲1.41

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: 1 new table, 6 new options
New tables
wp_bounced_email_logs
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bounce Handler MailPoet 3
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.07 ▼0.281.73 ▼0.2843.48 ▼0.77
Dashboard /wp-admin2,204 ▲275.68 ▲0.0593.46 ▲5.9942.45 ▲1.38
Posts /wp-admin/edit.php2,107 ▲102.02 ▲0.0336.83 ▲0.8932.79 ▼5.15
Add New Post /wp-admin/post-new.php1,532 ▲623.22 ▲0.05676.16 ▼5.4354.32 ▼0.34
Media Library /wp-admin/upload.php1,406 ▲94.23 ▲0.03104.28 ▲5.2647.17 ▼1.50

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
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_bounced_email_logs
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
Please take a closer look at the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bounce-handler-mailpoet/includes/class-mailpoet-handle-bounces.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bounce-handler-mailpoet/includes/class-mailpoet-bounce-handler-legacy.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bounce-handler-mailpoet/includes/personal-data-exporter.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PEAR' not found in wp-content/plugins/bounce-handler-mailpoet/includes/pear/socket.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/bounce-handler-mailpoet/includes/class-mailpoet-bounce-log.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bounce-handler-mailpoet/includes/class-mailpoet-bounce-handler.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bounce-handler-mailpoet/includes/scheduler.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bounce-handler-mailpoet/includes/rules.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: bounce handler, newsletter, emailing, mail, bounce email...

bounce-handler-mailpoet/bounce-handler-mailpoet.php Passed 13 tests

This is the main PHP file of "Bounce Handler MailPoet 3" version 1.3.21, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
116 characters long description:
Bounce Handler Mailpoet is an add-on for MailPoet 3 to handle bounce emails easily, when using your own SMTP server.

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
Good job! No executable or dangerous file extensions detected75,988 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript813,06013,04168,395
PHP181,0291,6704,572
CSS5155652,728
PO File1140276293

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity50.27
▷ Minimum class complexity7.00
▷ Maximum class complexity118.00
Average method complexity4.03
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods181
▷ Static methods3117.13%
▷ Public methods17395.58%
▷ Protected methods52.76%
▷ Private methods31.66%
Functions16
▷ Named functions1381.25%
▷ Anonymous functions318.75%
Constants20
▷ Global constants20100.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
7 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_desc.png0.15KB0.25KB0.00%
assets/img/modal_close_button.png0.49KB0.42KB▼ 14.62%
assets/screenshot-1.png58.15KB26.71KB▼ 54.07%
assets/images/modal_close_button.png0.49KB0.42KB▼ 14.62%
assets/img/sort_both.png0.20KB0.29KB0.00%