84% checkout-countdown-for-woocommerce

Code Review | Checkout Countdown for WooCommerce - FOMO Cart Abandonment

WordPress plugin Checkout Countdown for WooCommerce - FOMO Cart Abandonment scored 84% from 54 tests.

About plugin

  • Plugin page: checkout-countdow...
  • Plugin version: 3.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 5.9.2
  • First release: Apr 26, 2018
  • Latest release: Jan 20, 2022
  • Number of updates: 55
  • Update frequency: every 24.8 days
  • Top authors: morganhvidt (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active / 22,027 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼282.86ms] Passed 4 tests

This is a short check of server-side resources used by Checkout Countdown for WooCommerce - FOMO Cart Abandonment
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2056.13 ▲6.92
Dashboard /wp-admin3.62 ▲0.2237.81 ▲1.35
Posts /wp-admin/edit.php3.85 ▲0.2142.58 ▲6.83
Add New Post /wp-admin/post-new.php7.06 ▲0.0995.27 ▼1,143.97
Media Library /wp-admin/upload.php3.48 ▲0.1828.25 ▲4.35

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 1 new option
New WordPress options
ccfwoo_general_section

Browser metrics Passed 4 tests

Checking browser requirements for Checkout Countdown for WooCommerce - FOMO Cart Abandonment
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,001 ▲24317.70 ▲1.665.91 ▲0.082.21 ▼0.39
Dashboard /wp-admin3,130 ▲2768.32 ▲2.15142.18 ▲7.93149.14 ▼9.78
Posts /wp-admin/edit.php2,961 ▲2705.23 ▲2.0078.99 ▲16.73138.46 ▼3.68
Add New Post /wp-admin/post-new.php1,780 ▲6921.54 ▲0.84421.56 ▼36.05176.39 ▲19.98
Media Library /wp-admin/upload.php1,743 ▲425.65 ▲0.11107.52 ▼36.36188.50 ▲0.65

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • ccfwoo_general_section

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/checkout-countdown-for-woocommerce/functions/shortcode.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/checkout-countdown-for-woocommerce/functions/enqueue.php:75

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

checkout-countdown-for-woocommerce/checkout-countdown-for-woocommerce.php 92% from 13 tests

The entry point to "Checkout Countdown for WooCommerce - FOMO Cart Abandonment" version 3.1.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0")

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
No dangerous file extensions were detected1,468 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP93323721,158
JavaScript25568246
CSS20264

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.50
▷ Minimum class complexity3.00
▷ Maximum class complexity71.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants0
▷ Global constants00.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
No PNG files were detected