84% bayengage-email-marketing

Code Review | BayEngage: Email Marketing

WordPress plugin BayEngage: Email Marketing scored84%from 54 tests.

About plugin

  • Plugin page: bayengage-email-m...
  • Plugin version: 1.6.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2021
  • Latest release: Nov 16, 2023
  • Number of updates: 106
  • Update frequency: every 9.7 days
  • Top authors: bayengage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,458 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼4.95ms] Passed 4 tests

A check of server-side resources used by BayEngage: Email Marketing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0725.91 ▼9.21
Dashboard /wp-admin3.31 ▲0.0146.06 ▲0.69
Posts /wp-admin/edit.php3.37 ▲0.0147.30 ▼4.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.12 ▼6.44
Media Library /wp-admin/upload.php3.24 ▲0.0134.62 ▲0.57

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for BayEngage: Email Marketing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,468 ▼29414.29 ▲0.320.85 ▼0.7015.05 ▼25.36
Dashboard /wp-admin2,195 ▲275.62 ▼0.0491.50 ▼4.4743.17 ▲0.34
Posts /wp-admin/edit.php2,103 ▲31.96 ▲0.0239.67 ▼0.2837.06 ▲0.63
Add New Post /wp-admin/post-new.php1,526 ▼323.48 ▼0.17617.59 ▼30.3057.95 ▲4.05
Media Library /wp-admin/upload.php1,394 ▼94.17 ▼0.0197.35 ▼0.3144.90 ▲1.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • 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 everything seems fine, this is not 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
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/bayengage-email-marketing/public/partials/email-campaign-automation-public-display.php
    • > /wp-content/plugins/bayengage-email-marketing/admin/partials/email-campaign-automation-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: ecommerce, email campaign, email automation

bayengage-email-marketing/bayengage-email-campaign-automation.php 92% from 13 tests

The entry point to "BayEngage: Email Marketing" version 1.6.9 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bayengage-email-marketing.php" instead of "bayengage-email-campaign-automation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin828 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14292678822
JavaScript24546
CSS2080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.56
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods47
▷ Static methods12.13%
▷ Public methods4085.11%
▷ Protected methods00.00%
▷ Private methods714.89%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants880.00%
▷ Class constants220.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin