74% christmas-countdown-clock

Code Review | Christmas Countdown Clock

WordPress plugin Christmas Countdown Clock scored 74% from 54 tests.

About plugin

  • Plugin page: christmas-countdo...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-5.6.1
  • WordPress version: 6.3.1
  • First release: Sep 4, 2010
  • Latest release: Feb 18, 2021
  • Number of updates: 43
  • Update frequency: every 88.8 days
  • Top authors: enclick (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active / 14,217 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.82MB] [CPU: ▼51.53ms] Passed 4 tests

Analyzing server-side resources used by Christmas Countdown Clock
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.50 ▼36.87
Dashboard /wp-admin2.19 ▼1.117.22 ▼45.24
Posts /wp-admin/edit.php2.19 ▼1.176.71 ▼41.37
Add New Post /wp-admin/post-new.php2.19 ▼3.707.59 ▼82.63
Media Library /wp-admin/upload.php2.19 ▼1.048.72 ▼26.79

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Christmas Countdown Clock
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.051.97 ▲0.1943.65 ▼7.24
Dashboard /wp-admin2,209 ▲214.87 ▼0.16103.71 ▼4.6740.94 ▼7.51
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0237.46 ▲2.4334.82 ▼1.60
Add New Post /wp-admin/post-new.php1,514 ▼1917.57 ▼5.85685.76 ▲5.1858.88 ▲11.22
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0495.83 ▼12.1040.16 ▼8.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/christmas-countdown-clock/christmas-countdown-clock.php:389

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Compact countdown), #2 (Horizontal countdown), #3 (Vertical countdown with animation), #4 (Compact countdown with animation), #5 (Square countdown with background picture), #6 (Large Vertical countdown with background picture), #7 (Fireworks design)
You can look at the official readme.txt

christmas-countdown-clock/christmas-countdown-clock.php Passed 13 tests

The main PHP file in "Christmas Countdown Clock" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
132 characters long description:
Christmas countdown clock showing days and hours until Christmas day. Select from several designs, sizes, animations and backgrounds

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin485 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP218846485

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin