84% widget-countdown

Code Review | Countdown Timer - Widget Countdown

WordPress plugin Countdown Timer - Widget Countdown scored84%from 54 tests.

About plugin

  • Plugin page: widget-countdown
  • Plugin version: 2.6.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-6.2
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: Mar 31, 2023
  • Number of updates: 550
  • Update frequency: every 5.2 days
  • Top authors: wpdevart (100%)

Code review

54 tests

User reviews

55 reviews

Install metrics

10,000+ active /842,177 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 gracefully, with no errors

Server metrics [RAM: ▲0.26MB] [CPU: ▼1.57ms] Passed 4 tests

Analyzing server-side resources used by Countdown Timer - Widget Countdown
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2640.95 ▼3.99
Dashboard /wp-admin3.57 ▲0.2648.63 ▼2.84
Posts /wp-admin/edit.php3.68 ▲0.3257.10 ▲7.61
Add New Post /wp-admin/post-new.php6.14 ▲0.2598.20 ▲0.93
Media Library /wp-admin/upload.php3.49 ▲0.2637.05 ▼0.36
Countdown /wp-admin/admin.php?page=Countdown3.4635.33
Featured Plugins /wp-admin/admin.php?page=countdown-featured-plugins3.4633.54

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 112 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_wpdevart_countdown

Browser metrics Passed 4 tests

Countdown Timer - Widget Countdown: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲20013.58 ▼0.779.01 ▲6.6640.54 ▼4.12
Dashboard /wp-admin2,249 ▲785.77 ▲0.1983.81 ▼11.5088.77 ▲43.95
Posts /wp-admin/edit.php2,163 ▲812.30 ▲0.2737.68 ▼2.3536.79 ▲1.84
Add New Post /wp-admin/post-new.php6,416 ▲4,89027.78 ▲4.70907.04 ▲278.2235.86 ▼14.45
Media Library /wp-admin/upload.php1,451 ▲514.40 ▲0.27102.39 ▼0.9488.88 ▲42.93
Countdown /wp-admin/admin.php?page=Countdown8951.9427.8469.51
Featured Plugins /wp-admin/admin.php?page=countdown-featured-plugins1,1431.9625.6640.87

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_wpdevart_countdown

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widget-countdown/includes/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/widget-countdown/wpdevart-countdown.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
Please fix the following attributes:
  • Screenshots: Screenshot #5 (Back-end) image required
The official readme.txt might help

widget-countdown/wpdevart-countdown.php 92% from 13 tests

The main PHP file in "Countdown Timer - Widget Countdown" ver. 2.6.9 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("widget-countdown.php" instead of "wpdevart-countdown.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
Success! There were no dangerous files found in this plugin6,072 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
CSS5371743,276
PHP6203741,471
PO File3411,62825,194850
JavaScript4431475

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
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 complexity13.67
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods37
▷ Static methods410.81%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 PNG files occupy 0.19MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png2.57KB2.06KB▼ 19.93%
images/timer.png0.72KB0.94KB0.00%
images/featured_plugins/chart-featured.png9.09KB4.30KB▼ 52.70%
images/featured_plugins/youtube.png14.53KB5.69KB▼ 60.85%
images/featured_plugins/lightbox.png10.00KB4.64KB▼ 53.64%