68% gd-mail-queue

Code Review | GD Mail Queue

WordPress plugin GD Mail Queue scored 68% from 54 tests.

About plugin

  • Plugin page: gd-mail-queue
  • Plugin version: 4.2.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: May 3, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 65
  • Update frequency: every 24.0 days
  • Top authors: GDragoN (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active / 8,706 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲1.18MB] [CPU: ▼3.67ms] Passed 4 tests

Server-side resources used by GD Mail Queue
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.52 ▲1.0645.20 ▼0.64
Dashboard /wp-admin4.53 ▲1.2356.75 ▼2.74
Posts /wp-admin/edit.php4.58 ▲1.2355.39 ▼2.79
Add New Post /wp-admin/post-new.php7.11 ▲1.2389.58 ▼8.50
Media Library /wp-admin/upload.php4.45 ▲1.2342.61 ▲8.38

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 219 new files
Database: 4 new tables, 17 new options
New tables
wp_gdmaq_emails
wp_gdmaq_queue
wp_gdmaq_log_email
wp_gdmaq_log
New WordPress options
widget_recent-comments
dev4press_gd-mail-queue_settings
db_upgraded
dev4press_gd-mail-queue_cleanup
widget_theysaidso_widget
dev4press_gd-mail-queue_service_smtp
can_compress_scripts
theysaidso_admin_options
dev4press_gd-mail-queue_statistics
dev4press_gd-mail-queue_log
...

Browser metrics Passed 4 tests

Checking browser requirements for GD Mail Queue
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11314.78 ▲0.401.89 ▼0.0943.71 ▼1.89
Dashboard /wp-admin2,268 ▲924.87 ▼0.99112.09 ▼5.0042.52 ▼11.91
Posts /wp-admin/edit.php2,147 ▲552.01 ▼0.0234.39 ▼12.6035.29 ▼7.87
Add New Post /wp-admin/post-new.php1,580 ▲5118.46 ▲0.22647.33 ▲33.4050.97 ▼2.05
Media Library /wp-admin/upload.php1,441 ▲504.21 ▲0.0394.33 ▼3.4841.98 ▼1.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_gdmaq_log_email
    • wp_gdmaq_log
    • wp_gdmaq_queue
    • wp_gdmaq_emails
  • Zombie WordPress options detected upon uninstall: 17 options
    • dev4press_gd-mail-queue_external
    • db_upgraded
    • dev4press_gd-mail-queue_engine_phpmailer
    • theysaidso_admin_options
    • dev4press_gd-mail-queue_statistics
    • dev4press_gd-mail-queue_htmlfy
    • dev4press_gd-mail-queue_log
    • widget_theysaidso_widget
    • dev4press_gd-mail-queue_cleanup
    • widget_recent-posts
    • ...

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/gd-mail-queue/forms/about/whatsnew.php
  • 27× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gd-mail-queue/forms/about/info.php:5
    • > PHP Warning
      include(GDMAQ_PATHforms/setup/database.php): failed to open stream: No such file or directory in wp-content/plugins/gd-mail-queue/forms/tools/recheck.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gd-mail-queue/forms/setup/database.php:1
    • > PHP Notice
      Trying to get property 'attachments' of non-object in wp-content/plugins/gd-mail-queue/forms/log/entry.php on line 15
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/gd-mail-queue/forms/log/entry.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/gd-mail-queue/d4psec/encryption/Exception/BadFormatException.php:5
    • > PHP Warning
      Use of undefined constant GDMAQ_PATH - assumed 'GDMAQ_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gd-mail-queue/forms/about/whatsnew.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gd-mail-queue/forms/tools/import.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gd-mail-queue/forms/tools/remove.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/gd-mail-queue/forms/tools/export.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: email log, html email, dev4press, mail log, mail...

gd-mail-queue/gd-mail-queue.php 92% from 13 tests

"GD Mail Queue" version 4.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin21,032 lines of code in 179 files:
LanguageFilesBlank linesComment linesLines of code
PHP1233,2742,47013,517
CSS25722373,270
SVG2003,151
JavaScript2614559675
Sass1540244
HTML2170175

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity16.72
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes74
▷ Abstract classes1418.92%
▷ Concrete classes6081.08%
▷ Final classes711.67%
Methods717
▷ Static methods7810.88%
▷ Public methods53875.03%
▷ Protected methods719.90%
▷ Private methods10815.06%
Functions170
▷ Named functions16999.41%
▷ Anonymous functions10.59%
Constants96
▷ Global constants2829.17%
▷ Class constants6870.83%
▷ Public constants68100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
d4plib/resources/flags/flags.png79.53KB25.86KB▼ 67.48%