10% santas-christmas-countdown

Code Review | Christmas Countdown Widget

WordPress plugin Christmas Countdown Widget scored10%from 54 tests.

About plugin

  • Plugin page: santas-christmas-...
  • Plugin version: 2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2012
  • Latest release: Sep 23, 2023
  • Number of updates: 47
  • Update frequency: every 86.2 days
  • Top authors: monkeymays (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /35,126 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/santas-christmas-countdown/xmascount.php+68
    Methods with the same name as their class will not be constructors in a future version of PHP; cw_axmascount has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.89ms] Passed 4 tests

This is a short check of server-side resources used by Christmas Countdown Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.88 ▼34.58
Dashboard /wp-admin2.08 ▼1.266.98 ▼51.63
Posts /wp-admin/edit.php2.08 ▼1.276.00 ▼36.30
Add New Post /wp-admin/post-new.php2.08 ▼3.806.34 ▼89.05
Media Library /wp-admin/upload.php2.08 ▼1.156.18 ▼30.21

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_cw_axmascount
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Christmas Countdown Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.32 ▼0.282.01 ▲0.3541.84 ▼0.05
Dashboard /wp-admin2,195 ▲215.65 ▼0.0182.87 ▼10.5638.45 ▼0.43
Posts /wp-admin/edit.php2,097 ▼62.03 ▲0.0634.46 ▼4.3733.77 ▼0.32
Add New Post /wp-admin/post-new.php1,526 ▼223.22 ▲0.13654.45 ▼37.1652.33 ▼4.55
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.0195.57 ▼7.3041.99 ▼5.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/santas-christmas-countdown/xmascount.php+68
    Methods with the same name as their class will not be constructors in a future version of PHP; cw_axmascount has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_cw_axmascount
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/santas-christmas-countdown/xmascount.php:34

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Upload plugin and install.), #2 (On the plugins panel activate the Christmas Countdown Widget.), #3 (In the widgets menu drag the Christmas Countdown Widget to your sidebar.), #4 (The Christmas Countdown Widget displays a cute Santa Claus countdown to Christmas in your sidebar!), #5 (New since version 2.0 - use the shortcode `[countdown]` to display the countdown on any page or post.)
You can take inspiration from this readme.txt

santas-christmas-countdown/xmascount.php 92% from 13 tests

The main file in "Christmas Countdown Widget" v. 2.9 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: Please rename the main PHP file in this plugin to the plugin slug ("santas-christmas-countdown.php" instead of "xmascount.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin109 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1242562
JavaScript11027
CSS12020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.70MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png63.24KB18.73KB▼ 70.38%
screenshot-4.png229.56KB83.84KB▼ 63.48%
screenshot-2.png172.60KB53.71KB▼ 68.88%
css/santas-countdown-background.png28.62KB9.81KB▼ 65.71%
screenshot-5.png91.93KB95.87KB0.00%