68% automail

Code Review | AutoMail - Event-driven Email Automation. Easy email Notification and Auto-reply.

WordPress plugin AutoMail - Event-driven Email Automation. Easy email Notification and Auto-reply. scored68%from 54 tests.

About plugin

  • Plugin page: automail
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Nov 9, 2021
  • Latest release: Mar 3, 2022
  • Number of updates: 41
  • Update frequency: every 2.9 days
  • Top authors: javmah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲4.89MB] [CPU: ▲26.72ms] Passed 4 tests

Analyzing server-side resources used by AutoMail - Event-driven Email Automation. Easy email Notification and Auto-reply.
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /8.49 ▲5.0370.76 ▲32.33
Dashboard /wp-admin8.51 ▲5.2178.38 ▲31.44
Posts /wp-admin/edit.php8.51 ▲5.1683.55 ▲35.16
Add New Post /wp-admin/post-new.php10.06 ▲4.17108.96 ▲10.36
Media Library /wp-admin/upload.php8.51 ▲5.2867.21 ▲32.75
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5161.21

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 186 new files
Database: no new tables, 11 new options
New WordPress options
fs_active_plugins
widget_theysaidso_widget
widget_recent-posts
fs_gdpr
autoMail_installed
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
fs_debug_mode
...

Browser metrics Passed 4 tests

A check of browser resources used by AutoMail - Event-driven Email Automation. Easy email Notification and Auto-reply.
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19813.49 ▼1.087.91 ▲6.1428.73 ▼12.80
Dashboard /wp-admin2,242 ▲505.85 ▲0.89106.43 ▼2.3245.49 ▼0.45
Posts /wp-admin/edit.php2,104 ▲152.14 ▲0.1234.01 ▼3.1337.13 ▲2.40
Add New Post /wp-admin/post-new.php1,536 ▲622.91 ▲4.51671.08 ▲59.9851.98 ▲3.14
Media Library /wp-admin/upload.php1,427 ▲424.22 ▲0.0597.01 ▼4.2643.65 ▼1.27
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0831.8423.3427.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/automail/includes/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • fs_debug_mode
    • fs_gdpr
    • can_compress_scripts
    • autoMail_installed
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • fs_active_plugins
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • ...

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/automail/public/partials/automail-public-display.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/automail/admin/partials/automail-new-automaton.php:13
    • > 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/automail/includes/class-automail-list-table.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/automail/admin/partials/automail-edit-automaton.php:13
    • > 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/automail/includes/class-automail-list-table.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/automail/includes/class-automail-list-table.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: email, autoresponder, auto-reply, woocommerce, mail

automail/automail.php 92% from 13 tests

"AutoMail - Event-driven Email Automation. Easy email Notification and Auto-reply." version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Plugin Name: Please don't use more than 70 characters for the plugin name (currently 81 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin44,030 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PHP1217,74017,74134,354
JavaScript61,1901,5819,662
CSS130814

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,910)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 335)
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity106.36
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity5.83
▷ Minimum method complexity1.00
▷ Maximum method complexity335.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,231
▷ Static methods17614.30%
▷ Public methods88671.97%
▷ Protected methods151.22%
▷ Private methods33026.81%
Functions97
▷ Named functions97100.00%
▷ Anonymous functions00.00%
Constants124
▷ Global constants9979.84%
▷ Class constants2520.16%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%