84% lh-email-queue-and-log

Code Review | LH Email Queue and Log

WordPress plugin LH Email Queue and Log scored 84% from 54 tests.

About plugin

  • Plugin page: lh-email-queue-an...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 5.8.1
  • First release: Dec 8, 2017
  • Latest release: Feb 8, 2018
  • Number of updates: 4
  • Update frequency: every 15.5 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 421 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼143.80ms] Passed 4 tests

A check of server-side resources used by LH Email Queue and Log
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0533.64 ▲0.34
Dashboard /wp-admin3.11 ▲0.0648.21 ▲5.67
Posts /wp-admin/edit.php3.16 ▲0.0546.69 ▲0.67
Add New Post /wp-admin/post-new.php5.47 ▲0.0389.24 ▼575.00
Media Library /wp-admin/upload.php3.05 ▲0.0532.16 ▼1.19
Email Queue/Log /wp-admin/tools.php?page=lh-email-queue-and-log/lh-email-queue-and-log.php3.0228.45

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: 1 new table, no new options
New tables
wp_lh_email_queue_log

Browser metrics Passed 4 tests

Checking browser requirements for LH Email Queue and Log
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.25 ▲0.588.62 ▼0.4748.15 ▲4.98
Dashboard /wp-admin2,997 ▲636.02 ▲0.07140.83 ▼6.29103.04 ▼3.79
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0166.34 ▲0.5987.13 ▼2.50
Add New Post /wp-admin/post-new.php1,618 ▲321.41 ▲0.06297.40 ▼13.3497.37 ▼5.99
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.02158.00 ▲10.52110.65 ▼0.63
Email Queue/Log /wp-admin/tools.php?page=lh-email-queue-and-log/lh-email-queue-and-log.php1,0332.0652.3268.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 uninstall procedure failed, leaving 1 table in the database
    • wp_lh_email_queue_log

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lh-email-queue-and-log/lh-email-queue-and-log.php:360
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lh-email-queue-and-log/includes/partials/tools.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/lh-email-queue-and-log/includes/lh-email-queue-log-menu-class.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lh-email-queue-and-log/includes/lh-email-queue-log-menu-class.php on line 5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/lh-email-queue-and-log/includes/lh-email-queue-log-menu-class.php on line 5

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: emails, queue, email, asynchronous

lh-email-queue-and-log/lh-email-queue-and-log.php Passed 13 tests

"LH Email Queue and Log" version 1.01's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
36 characters long description:
Creates an email queue for wordpress

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
There were no executable files found in this plugin242 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP324360242

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1043.48%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/track-log.png0.90KB0.09KB▼ 89.69%