77% letsrecover-woocommerce-abandoned-cart

Code Review | LetsRecover WooCommerce Abandoned Cart Recovery Notifications

WordPress plugin LetsRecover WooCommerce Abandoned Cart Recovery Notifications scored 77% from 54 tests.

About plugin

  • Plugin page: letsrecover-wooco...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.9.2
  • First release: May 20, 2021
  • Latest release: May 29, 2021
  • Number of updates: 16
  • Update frequency: every 0.6 days
  • Top authors: tahir1002 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 190 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼300.08ms] Passed 4 tests

An overview of server-side resources used by LetsRecover WooCommerce Abandoned Cart Recovery Notifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0158.71 ▲5.15
Dashboard /wp-admin3.41 ▲0.0034.70 ▼0.08
Posts /wp-admin/edit.php3.64 ▲0.0036.39 ▼12.97
Add New Post /wp-admin/post-new.php6.88 ▼0.0995.48 ▼1,187.40
Media Library /wp-admin/upload.php3.29 ▲0.0027.39 ▲0.14

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 462 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for LetsRecover WooCommerce Abandoned Cart Recovery Notifications
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲3616.18 ▲0.396.90 ▲1.183.03 ▲0.32
Dashboard /wp-admin2,892 ▲326.14 ▲0.01166.22 ▲35.37162.90 ▲1.10
Posts /wp-admin/edit.php2,685 ▼03.22 ▼0.0164.87 ▲3.29146.30 ▲2.40
Add New Post /wp-admin/post-new.php1,781 ▲12017.78 ▲2.13453.91 ▲36.65193.75 ▼18.51
Media Library /wp-admin/upload.php1,692 ▼05.51 ▼0.01161.53 ▲0.52229.09 ▲10.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/page-menu.php
  • 241× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: stats in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/pages/dashboard.php on line 37
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/libraries/push/vendor/guzzlehttp/promises/src/AggregateException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/libraries/push/vendor/web-token/jwt-signature-algorithm-ecdsa/Tests/ECDSAFromRFC7520Test.php:32
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/pages/dashboard.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\Universal\\OctetString' not found in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/libraries/push/vendor/fgrosse/phpasn1/lib/ASN1/Universal/BitString.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Jose\\Component\\Signature\\Algorithm\\ECDSA' not found in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/libraries/push/vendor/web-token/jwt-signature-algorithm-ecdsa/ES384.php:16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/pages/dashboard.php on line 32
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\AbstractString' not found in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/libraries/push/vendor/fgrosse/phpasn1/lib/ASN1/Universal/IA5String.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/libraries/push/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\ASNObject' not found in wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/libraries/push/vendor/fgrosse/phpasn1/lib/ASN1/AbstractTime.php:18

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

letsrecover-woocommerce-abandoned-cart/letsrecover.php 77% from 13 tests

This is the main PHP file of "LetsRecover WooCommerce Abandoned Cart Recovery Notifications" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "5.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("letsrecover-woocommerce-abandoned-cart.php" instead of "letsrecover.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/letsrecover-woocommerce-abandoned-cart/include/libraries/push/vendor/web-token/jwt-key-mgmt/Tests/Chain/google.crt
32,666 lines of code in 371 files:
LanguageFilesBlank linesComment linesLines of code
PHP3105,74412,16024,160
Markdown241,17003,573
JavaScript93592211,901
JSON18101,727
CSS45581,176
XML3121112
make1409
YAML2008

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.05
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces43
Interfaces33
Traits3
Classes241
▷ Abstract classes114.56%
▷ Concrete classes23095.44%
▷ Final classes3916.96%
Methods1,900
▷ Static methods30516.05%
▷ Public methods1,55781.95%
▷ Protected methods944.95%
▷ Private methods24913.11%
Functions182
▷ Named functions6736.81%
▷ Anonymous functions11563.19%
Constants171
▷ Global constants52.92%
▷ Class constants16697.08%
▷ Public constants15693.98%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bell.png1.71KB1.60KB▼ 6.62%
assets/images/native-prompt.png38.94KB13.05KB▼ 66.47%