84% countdown-time

Code Review | Countdown Timer block - Display the event's date into a timer.

WordPress plugin Countdown Timer block - Display the event's date into a timer. scored84%from 54 tests.

About plugin

  • Plugin page: countdown-time
  • Plugin version: 1.1.7
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 2, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 50
  • Update frequency: every 15.2 days
  • Top authors: charlescormier (92%)abuhayat (10%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /12,502 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.52ms] Passed 4 tests

A check of server-side resources used by Countdown Timer block - Display the event's date into a timer.
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.74 ▼2.16
Dashboard /wp-admin3.34 ▲0.0447.03 ▼9.59
Posts /wp-admin/edit.php3.39 ▲0.0449.48 ▲2.17
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.78 ▼3.18
Media Library /wp-admin/upload.php3.27 ▲0.0336.32 ▲0.84

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Countdown Timer block - Display the event's date into a timer.
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.20 ▼0.372.06 ▲0.2941.54 ▼2.43
Dashboard /wp-admin2,198 ▲185.64 ▼0.0186.04 ▼13.8438.44 ▼5.54
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0135.84 ▲1.0934.34 ▼1.38
Add New Post /wp-admin/post-new.php6,369 ▲4,84328.04 ▲5.07891.88 ▲209.0953.84 ▲2.35
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.0497.35 ▼19.1843.07 ▼6.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant CTB_PLUGIN_VERSION - assumed 'CTB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/countdown-time/dist/editor.asset.php on line 4
    • > PHP Warning
      Use of undefined constant CTB_PLUGIN_VERSION - assumed 'CTB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/countdown-time/dist/script.asset.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

countdown-time/plugin.php 92% from 13 tests

The primary PHP file in "Countdown Timer block - Display the event's date into a timer." version 1.1.7 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("countdown-time.php" instead of "plugin.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 detected464 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File195194208
JSON200196
PHP4171556
CSS2022
JavaScript2022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected