68% abandonment-protector

Code Review | Email marketing automation by Abandonment ProtectorAbandoned cart recovery, Newsletters, Popups, Exit intent

WordPress plugin Email marketing automation by Abandonment ProtectorAbandoned cart recovery, Newsletters, Popups, Exit intent scored 68% from 54 tests.

About plugin

  • Plugin page: abandonment-prote...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7
  • WordPress version: 5.8.1
  • First release: Jul 21, 2021
  • Latest release: Feb 24, 2022
  • Number of updates: 14
  • Update frequency: every 16.6 days
  • Top authors: chilliappswp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 442 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.47MB] [CPU: ▼158.98ms] Passed 4 tests

Analyzing server-side resources used by Email marketing automation by Abandonment ProtectorAbandoned cart recovery, Newsletters, Popups, Exit intent
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.02 ▲0.1825.59 ▲4.06
Dashboard /wp-admin3.26 ▲0.2032.86 ▼4.42
Posts /wp-admin/edit.php3.31 ▲0.2130.24 ▼1.51
Add New Post /wp-admin/post-new.php3.05 ▼2.3919.47 ▼632.58
Media Library /wp-admin/upload.php3.15 ▲0.1425.44 ▲2.58

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, no new options
New tables
wp_abprotector_abandoned_carts

Browser metrics Passed 4 tests

A check of browser resources used by Email marketing automation by Abandonment ProtectorAbandoned cart recovery, Newsletters, Popups, Exit intent
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,737 ▲11116.24 ▲0.554.83 ▼0.5089.92 ▲18.53
Dashboard /wp-admin2,999 ▲1066.13 ▼0.04116.13 ▼14.6748.84 ▼127.98
Posts /wp-admin/edit.php2,808 ▲653.26 ▲0.0166.30 ▲0.5045.26 ▼96.20
Add New Post /wp-admin/post-new.php2,332 ▼1,48315.29 ▼3.57413.57 ▼1.24106.82 ▼49.02
Media Library /wp-admin/upload.php1,813 ▲645.57 ▲0.03143.47 ▲1.57140.09 ▼40.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/abandonment-protector/uninstall.php+6
    Constant ABPROTECTOR_POPUPS_SCRIPTS_KEY already defined
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_abprotector_abandoned_carts

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

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/abandonment-protector/partials/no_woocommerce.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/abandonment-protector/classes/abprotector-woo-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/abandonment-protector/partials/top_header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/abandonment-protector/abprotector.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/abandonment-protector/partials/top_header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/abandonment-protector/partials/top_header.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
You can take inspiration from this readme.txt

abandonment-protector/abprotector.php 92% from 13 tests

Analyzing the main PHP file in "Email marketing automation by Abandonment ProtectorAbandoned cart recovery, Newsletters, Popups, Exit intent" version 1.0.9
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("abandonment-protector.php" instead of "abprotector.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,059 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP214702011,667
CSS1566223
JavaScript3324169

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.44
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods128
▷ Static methods86.25%
▷ Public methods12396.09%
▷ Protected methods10.78%
▷ Private methods43.12%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/wordpress1.png7.14KB3.83KB▼ 46.37%
resources/images/abandonment_protector_logo.png8.68KB4.23KB▼ 51.29%
resources/images/logo-abandonment.png4.12KB2.88KB▼ 30.01%
resources/images/wordpress2.png10.54KB6.43KB▼ 39.02%