58% 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 scored58%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: 6.3.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 /960 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.66MB] [CPU: ▼12.84ms] Passed 4 tests

A check of server-side resources used by Email marketing automation by Abandonment ProtectorAbandoned cart recovery, Newsletters, Popups, Exit intent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.27 ▲6.89
Dashboard /wp-admin3.34 ▲0.0354.72 ▲4.61
Posts /wp-admin/edit.php3.39 ▲0.0348.65 ▲0.29
Add New Post /wp-admin/post-new.php3.15 ▼2.7437.82 ▼54.88
Media Library /wp-admin/upload.php3.26 ▲0.0335.55 ▼1.38

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: 1 new table, 6 new options
New tables
wp_abprotector_abandoned_carts
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Email marketing automation by Abandonment ProtectorAbandoned cart recovery, Newsletters, Popups, Exit intent
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲8714.36 ▲0.011.69 ▼0.1045.17 ▲4.70
Dashboard /wp-admin2,257 ▲875.71 ▲0.1090.00 ▼9.0734.15 ▼3.34
Posts /wp-admin/edit.php2,159 ▲592.01 ▲0.0237.74 ▲0.6330.39 ▼6.28
Add New Post /wp-admin/post-new.php1,540 ▲323.38 ▲5.23667.95 ▲44.4456.36 ▼14.12
Media Library /wp-admin/upload.php1,456 ▲534.21 ▼0.01110.30 ▼7.4043.48 ▼7.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/abandonment-protector/uninstall.php+6
    Constant ABPROTECTOR_POPUPS_SCRIPTS_KEY already defined
  • Zombie tables detected upon uninstall: 1 table
    • wp_abprotector_abandoned_carts
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/abandonment-protector/partials/no_woocommerce.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > 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
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The primary PHP file in "Email marketing automation by Abandonment ProtectorAbandoned cart recovery, Newsletters, Popups, Exit intent" version 1.0.9 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main 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 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,059 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP214702011,667
CSS1566223
JavaScript3324169

PHP code Passed 2 tests

A brief analysis 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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/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%
resources/images/wordpress1.png7.14KB3.83KB▼ 46.37%