74% asynchronous-emails

Code Review | Asynchronous Emails

WordPress plugin Asynchronous Emails scored74%from 54 tests.

About plugin

  • Plugin page: asynchronous-emails
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2023
  • Latest release: Feb 17, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: endisha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /424 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲1.25ms] Passed 4 tests

A check of server-side resources used by Asynchronous Emails
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1742.27 ▲4.76
Dashboard /wp-admin3.54 ▲0.2352.74 ▲6.52
Posts /wp-admin/edit.php3.59 ▲0.2349.54 ▲2.02
Add New Post /wp-admin/post-new.php6.06 ▲0.1784.47 ▼2.63
Media Library /wp-admin/upload.php3.40 ▲0.1735.39 ▲0.85
Settings /wp-admin/admin.php?page=asynchronous-emails-settings3.4036.36
Queues /wp-admin/admin.php?page=asynchronous-emails-queue3.4135.28

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 35 new files
Database: 1 new table, 7 new options
New tables
wp_asynchronous_email_queue
New WordPress options
asynchronous_emails_settings
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Asynchronous Emails
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.72 ▲0.321.62 ▲0.0342.93 ▼0.48
Dashboard /wp-admin2,221 ▲445.58 ▼0.0784.17 ▼13.1936.76 ▼3.67
Posts /wp-admin/edit.php2,126 ▲232.01 ▼0.0235.71 ▼3.9230.38 ▼6.63
Add New Post /wp-admin/post-new.php1,545 ▲1723.09 ▼0.14687.39 ▼24.4352.64 ▼0.40
Media Library /wp-admin/upload.php1,423 ▲234.19 ▼0.02100.25 ▼4.0543.79 ▼0.65
Settings /wp-admin/admin.php?page=asynchronous-emails-settings1,1673.9862.8825.63
Queues /wp-admin/admin.php?page=asynchronous-emails-queue1,2304.0171.5925.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_asynchronous_email_queue
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • asynchronous_emails_settings
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'AsynchronousEmailsAbstractSchedulingManager' not found in wp-content/plugins/asynchronous-emails/jobs/scheduling-delete-old-queue-records-job.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AsynchronousEmailsAbstractModel' not found in wp-content/plugins/asynchronous-emails/models/queue-model.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'AsynchronousEmailsAbstractSchedulingManager' not found in wp-content/plugins/asynchronous-emails/jobs/scheduling-emails-job.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'AsynchronousEmailsAbstractSchedulingManager' not found in wp-content/plugins/asynchronous-emails/jobs/send-email-job.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/asynchronous-emails/configs/jobs.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: async, async-emails, emails, mails, scheduling

asynchronous-emails/asynchronous-emails.php 92% from 13 tests

The primary PHP file in "Asynchronous Emails" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.7" instead of "5.9")

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 plugin4,221 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript54153192,777
PHP222366701,090
CSS2177177
PO File1220417164
SQL10013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods56
▷ Static methods712.50%
▷ Public methods5394.64%
▷ Protected methods23.57%
▷ Private methods11.79%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
resources/assets/images/ui-icons_222222_256x240.png6.68KB4.20KB▼ 37.05%