78% wp-countdown-timer

Code Review | Wordpress Countdown Timer

WordPress plugin Wordpress Countdown Timer scored78%from 54 tests.

About plugin

  • Plugin page: wp-countdown-timer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8
  • WordPress version: 6.3.1
  • First release: Jan 20, 2014
  • Latest release: Mar 15, 2014
  • Number of updates: 8
  • Update frequency: every 6.9 days
  • Top authors: jordancalder (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /27,613 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.06MB] [CPU: ▼3.84ms] Passed 4 tests

Server-side resources used by Wordpress Countdown Timer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.16 ▼5.68
Dashboard /wp-admin3.37 ▲0.0747.13 ▼2.63
Posts /wp-admin/edit.php3.49 ▲0.1352.29 ▲1.44
Add New Post /wp-admin/post-new.php5.95 ▲0.0787.64 ▼7.23
Media Library /wp-admin/upload.php3.30 ▲0.0736.95 ▲0.19
WP Countdown Timer /wp-admin/options-general.php?page=wordpress-countdown-timer3.2632.90

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Wordpress Countdown Timer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14113.66 ▼0.605.58 ▲3.6742.21 ▼2.16
Dashboard /wp-admin2,225 ▲224.87 ▼0.03108.69 ▼13.2036.87 ▼6.31
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0639.26 ▲1.6435.05 ▼3.43
Add New Post /wp-admin/post-new.php1,548 ▼823.79 ▲5.74685.02 ▼2.5454.87 ▼0.63
Media Library /wp-admin/upload.php1,401 ▲14.15 ▼0.08106.21 ▼0.0445.67 ▼2.18
WP Countdown Timer /wp-admin/options-general.php?page=wordpress-countdown-timer8502.0724.3725.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-countdown-timer/public/views/public.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-countdown-timer/admin/views/admin.php:13

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There are too many tags (51 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

wp-countdown-timer/wordpress-countdown-timer.php 92% from 13 tests

The main file in "Wordpress Countdown Timer" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-countdown-timer.php" instead of "wordpress-countdown-timer.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 plugin300 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP7113302256
JavaScript26125
CSS23219

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.50
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods730.43%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.16MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png137.96KB40.06KB▼ 70.96%
assets/banner-1544x500.png14.68KB13.29KB▼ 9.45%
assets/banner-772x250.png10.45KB9.46KB▼ 9.44%