82% countdown-timer

Code Review | Countdown Timer

WordPress plugin Countdown Timer scored 82% from 53 tests.

About plugin

  • Plugin page: countdown-timer
  • Plugin version: 3.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 5.8.1
  • First release: Apr 6, 2006
  • Latest release: Jan 24, 2019
  • Number of updates: 375
  • Update frequency: every 12.5 days
  • Top authors: fergbrain (100%)

Code review

53 tests

User reviews

10 reviews

Install metrics

2,000+ active / 219,248 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼261.51ms] Passed 4 tests

An overview of server-side resources used by Countdown Timer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.06 ▲0.3440.07 ▲19.96
Dashboard /wp-admin3.36 ▲0.3048.41 ▲5.91
Posts /wp-admin/edit.php3.41 ▲0.3046.14 ▲3.67
Add New Post /wp-admin/post-new.php5.66 ▲0.2398.04 ▼1,045.95
Media Library /wp-admin/upload.php3.24 ▲0.2331.46 ▼9.66

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 57 new files
Database: no new tables, 17 new options
New WordPress options
fergcorp_countdownTimer_version
fergcorp_countdownTimer_showMinute
fergcorp_countdownTimer_showMonth
fergcorp_countdownTimer_timeSinceTime
fergcorp_countdownTimer_enableShortcodeExcerpt
fergcorp_countdownTimer_timeFormat
fergcorp_countdownTimer_showDay
fergcorp_countdownTimer_showYear
fergcorp_countdownTimer_oneTimeEvent
fergcorp_countdownTimer_enableJS
...

Browser metrics Passed 4 tests

Checking browser requirements for Countdown Timer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲16216.28 ▲0.7113.19 ▲4.8449.29 ▲0.22
Dashboard /wp-admin2,957 ▲1075.93 ▲0.09133.63 ▲3.16103.14 ▲2.89
Posts /wp-admin/edit.php2,711 ▲52.69 ▼0.0064.91 ▲1.2593.73 ▲10.20
Add New Post /wp-admin/post-new.php1,856 ▲519.13 ▲1.35363.62 ▼13.79106.93 ▲4.59
Media Library /wp-admin/upload.php1,777 ▲55.04 ▲0.01142.66 ▼4.67107.74 ▼12.29
Countdown Timer /wp-admin/fergcorp_countdownTimer.php260.900.0911.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/countdown-timer/index.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(fergcorp_countdownTimer.php): failed to open stream: No such file or directory in wp-content/plugins/countdown-timer/tests/CountDownTimerTest.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'fergcorp_countdownTimer.php' (include_path='.:/usr/share/php') in wp-content/plugins/countdown-timer/tests/CountDownTimerTest.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/countdown-timer/fergcorp_countdownTimer.php:1276

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/fergcorp_countdownTimer.php
    • > Network (severe)
    wp-admin/fergcorp_countdownTimer.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Administration Interface), #2 (Example on Blog)
You can take inspiration from this readme.txt

countdown-timer/fergcorp_countdownTimer.php 92% from 13 tests

Analyzing the main PHP file in "Countdown Timer" version 3.0.7
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("countdown-timer.php" instead of "fergcorp_countdownTimer.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
No dangerous file extensions were detected6,573 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PO File221,5443,7474,215
PHP45526292,056
JavaScript45737302

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity8.47
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods125
▷ Static methods10.80%
▷ Public methods125100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.21MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png106.43KB107.73KB0.00%
screenshot-1.png108.68KB109.96KB0.00%