74% email-campaign-user-notifications

Code Review | Email Campaign User Notifications

WordPress plugin Email Campaign User Notifications scored74%from 54 tests.

About plugin

  • Plugin page: email-campaign-us...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2022
  • Latest release: Feb 2, 2023
  • Number of updates: 8
  • Update frequency: every 4.4 days
  • Top authors: haritpanchal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /592 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.12MB] [CPU: ▼45.22ms] Passed 4 tests

This is a short check of server-side resources used by Email Campaign User Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6112.22 ▼32.18
Dashboard /wp-admin2.89 ▼0.4117.96 ▼37.21
Posts /wp-admin/edit.php2.90 ▼0.4619.34 ▼33.70
Add New Post /wp-admin/post-new.php2.89 ▼2.9917.54 ▼77.80
Media Library /wp-admin/upload.php2.90 ▼0.3317.42 ▼19.45

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 10 new options
New WordPress options
default_template
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
Activated_Plugin
default_subject
theysaidso_admin_options
email_crons_roles_chunk
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Email Campaign User Notifications
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.74 ▲0.451.75 ▼0.4838.87 ▼6.42
Dashboard /wp-admin2,214 ▲375.63 ▼0.0190.40 ▼2.7242.52 ▼0.49
Posts /wp-admin/edit.php2,116 ▲162.02 ▼0.0039.82 ▲1.5937.39 ▲2.10
Add New Post /wp-admin/post-new.php1,548 ▲2218.18 ▼5.03628.70 ▼60.0764.77 ▲11.63
Media Library /wp-admin/upload.php1,410 ▲104.22 ▲0.1299.40 ▼16.7742.36 ▼5.07

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
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/email-campaign-user-notifications/email-crons.php+74
    Undefined variable: ecun_page
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • default_subject
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • default_template
    • email_crons_roles_chunk

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/email-campaign-user-notifications/includes/settings/class-ecun-config.php
    • > /wp-content/plugins/email-campaign-user-notifications/includes/settings/class-ecun-sendemail.php
    • > /wp-content/plugins/email-campaign-user-notifications/email-crons.php
    • > /wp-content/plugins/email-campaign-user-notifications/includes/tabs/class-ecun-usersselection.php
    • > /wp-content/plugins/email-campaign-user-notifications/includes/tabs/class-ecun-emailtest.php
    • > /wp-content/plugins/email-campaign-user-notifications/includes/class-ecun-addmenupage.php
    • > /wp-content/plugins/email-campaign-user-notifications/includes/tabs/class-ecun-savetemplate.php
    • > /wp-content/plugins/email-campaign-user-notifications/includes/tabs/class-ecun-cronssettings.php

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: campaign, plugin, email

email-campaign-user-notifications/email-crons.php 85% from 13 tests

The entry point to "Email Campaign User Notifications" version 1.1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("email-campaign-user-notifications.php" instead of "email-crons.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected698 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP872222587
JavaScript25274
CSS21037

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.86
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin