71% agile-crm-email-marketing

Code Review | Agile CRM Email Marketing

WordPress plugin Agile CRM Email Marketing scored71%from 54 tests.

About plugin

  • Plugin page: agile-crm-email-m...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Dec 26, 2017
  • Latest release: Dec 28, 2017
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: shreyanshsurana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /954 total downloads

Benchmarks

Plugin footprint 83% 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 gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼21.86ms] Passed 4 tests

Analyzing server-side resources used by Agile CRM Email Marketing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1428.70 ▼12.58
Dashboard /wp-admin3.29 ▼0.0127.52 ▼21.33
Posts /wp-admin/edit.php3.43 ▲0.0734.17 ▼17.27
Add New Post /wp-admin/post-new.php5.67 ▼0.2169.14 ▼36.25
Media Library /wp-admin/upload.php3.38 ▲0.1532.17 ▼3.95
Email Campaigns /wp-admin/admin.php?page=agilecrm_email_marketing_email3.4132.24
Settings /wp-admin/admin.php?page=agilecrm_email_marketing_settings3.4032.10
Web Rules /wp-admin/admin.php?page=agilecrm_email_marketing_webrules3.4133.21
Landing Pages /wp-admin/admin.php?page=agilecrm_email_marketing_landing3.4133.31
Home /wp-admin/admin.php?page=agilecrm_email_marketing_dashboard3.4032.79
Refer a Friend /wp-admin/admin.php?page=agilecrm_email_marketing_refer3.4335.15
Form Builder /wp-admin/admin.php?page=agilecrm_email_marketing_formbuilder3.4132.33
Web Stats /wp-admin/admin.php?page=agilecrm_email_marketing_webstats3.4033.15

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
email_marketing_agile_webrules
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
email_marketing_agile_webstats

Browser metrics Passed 4 tests

Agile CRM Email Marketing: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲21913.74 ▼0.6317.79 ▲15.6342.93 ▼3.23
Dashboard /wp-admin2,253 ▲625.85 ▲0.97103.91 ▲0.1485.78 ▲41.00
Posts /wp-admin/edit.php2,145 ▲562.03 ▲0.0235.19 ▼2.7032.44 ▼3.40
Add New Post /wp-admin/post-new.php1,562 ▲4223.14 ▼0.09733.27 ▲72.7836.51 ▼13.86
Media Library /wp-admin/upload.php1,435 ▲474.22 ▼0.05103.83 ▼3.9647.35 ▲5.77
Email Campaigns /wp-admin/admin.php?page=agilecrm_email_marketing_email9351.7127.3231.10
Settings /wp-admin/admin.php?page=agilecrm_email_marketing_settings9292.0723.1132.27
Web Rules /wp-admin/admin.php?page=agilecrm_email_marketing_webrules9351.8626.9433.41
Landing Pages /wp-admin/admin.php?page=agilecrm_email_marketing_landing9381.8327.4430.18
Home /wp-admin/admin.php?page=agilecrm_email_marketing_dashboard9292.0325.1732.33
Refer a Friend /wp-admin/admin.php?page=agilecrm_email_marketing_refer9462.0824.8932.03
Form Builder /wp-admin/admin.php?page=agilecrm_email_marketing_formbuilder9351.7027.1629.67
Web Stats /wp-admin/admin.php?page=agilecrm_email_marketing_webstats9322.0623.2029.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • email_marketing_agile_webrules
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • email_marketing_agile_webstats
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=agilecrm_email_marketing_webstats
    • > Notice in wp-content/plugins/agile-crm-email-marketing/index.php+900
    Undefined index: domain
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=agilecrm_email_marketing_webstats
    • > Notice in wp-content/plugins/agile-crm-email-marketing/index.php+959
    Undefined index: save
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=agilecrm_email_marketing_webstats
    • > Notice in wp-content/plugins/agile-crm-email-marketing/index.php+1043
    Undefined variable: errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=agilecrm_email_marketing_dashboard
    • > Notice in wp-content/plugins/agile-crm-email-marketing/index.php+121
    Undefined variable: deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=agilecrm_email_marketing_dashboard
    • > Notice in wp-content/plugins/agile-crm-email-marketing/index.php+121
    Undefined variable: autoload
    • > GET request to /wp-admin/admin.php?page=agilecrm_email_marketing_dashboard
    • > Notice in wp-content/plugins/agile-crm-email-marketing/index.php+124
    Undefined index: status
    • > GET request to /wp-admin/admin.php?page=agilecrm_email_marketing_dashboard
    • > Notice in wp-content/plugins/agile-crm-email-marketing/index.php+128
    Undefined index: restatus

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/agile-crm-email-marketing/index.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=agilecrm_email_marketing_formbuilder
    • > Console-api (severe) in wp-content/plugins/agile-crm-email-marketing/js/pubnub-3.4.min.js+6:274
    Missing Channel

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #5, #6, #7, #8, #9 in agile-crm-email-marketing/assets to your readme.txt
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

agile-crm-email-marketing/index.php 85% from 13 tests

The main file in "Agile CRM Email Marketing" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 183 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("agile-crm-email-marketing.php" instead of "index.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
No dangerous file extensions were detected2,384 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP169531,302
CSS12131759
SVG7287200
JavaScript10132123

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.97MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/frombuilder.png103.04KB29.05KB▼ 71.81%
images/web-stats.png38.69KB41.06KB0.00%
images/campaign-newsletter.png9.62KB10.23KB0.00%
images/email.png90.78KB22.54KB▼ 75.17%
images/landing.png390.33KB165.52KB▼ 57.60%