94% wp-mail-fix-multiple-send

Code Review | wp_mail fix multiple send

WordPress plugin wp_mail fix multiple send scored 94% from 54 tests.

About plugin

  • Plugin page: wp-mail-fix-multi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.2
  • WordPress version: 5.8.1
  • First release: Oct 9, 2017
  • Latest release: Oct 9, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mr_mat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 518 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by wp_mail fix multiple send
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0033.79 ▼4.42
Dashboard /wp-admin3.06 ▲0.0146.64 ▼4.24
Posts /wp-admin/edit.php3.11 ▼0.0043.40 ▼4.64
Add New Post /wp-admin/post-new.php5.42 ▼0.0189.04 ▼562.50
Media Library /wp-admin/upload.php3.01 ▲0.0031.20 ▼1.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

wp_mail fix multiple send: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6615.81 ▲0.229.51 ▲0.9847.90 ▼13.60
Dashboard /wp-admin2,970 ▲335.90 ▼0.06126.28 ▼34.96111.53 ▼5.97
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0067.46 ▼1.3189.36 ▼4.56
Add New Post /wp-admin/post-new.php1,683 ▼018.77 ▲0.01352.53 ▼40.62113.10 ▼5.49
Media Library /wp-admin/upload.php1,807 ▼35.01 ▲0.01156.55 ▲9.40117.43 ▲1.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-mail-fix-multiple-send/wp-mail-fix-multiple-send.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-mail-fix-multiple-send === )
You can take inspiration from this readme.txt

wp-mail-fix-multiple-send/wp-mail-fix-multiple-send.php Passed 13 tests

The main PHP script in "wp_mail fix multiple send" version 1.0 is automatically included on every request by WordPress
76 characters long description:
Avoids wp_mail to send multiple times the same mail within the same request.

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
There were no executable files found in this plugin17 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP131317

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin