10% halloween-countdown-widget

Code Review | Halloween Countdown Widget

WordPress plugin Halloween Countdown Widget scored10%from 54 tests.

About plugin

  • Plugin page: halloween-countdo...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 6, 2012
  • Latest release: Sep 23, 2023
  • Number of updates: 22
  • Update frequency: every 182.1 days
  • Top authors: monkeymays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,991 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/halloween-countdown-widget/hallocount.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; hallocount has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼51.55ms] Passed 4 tests

A check of server-side resources used by Halloween Countdown Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.66 ▼33.54
Dashboard /wp-admin2.08 ▼1.225.58 ▼39.78
Posts /wp-admin/edit.php2.08 ▼1.285.78 ▼42.46
Add New Post /wp-admin/post-new.php2.08 ▼3.816.28 ▼90.43
Media Library /wp-admin/upload.php2.08 ▼1.155.60 ▼28.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_hallocount
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Halloween Countdown Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▼0.201.74 ▲0.1943.93 ▲3.47
Dashboard /wp-admin2,198 ▲215.63 ▼0.0292.58 ▲6.7144.19 ▲1.08
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.1339.60 ▲1.1137.21 ▲1.03
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▲0.08667.79 ▲5.0053.18 ▼23.15
Media Library /wp-admin/upload.php1,403 ▲34.27 ▼0.0398.79 ▲2.0845.57 ▼0.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/halloween-countdown-widget/hallocount.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; hallocount has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_hallocount
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/halloween-countdown-widget/hallocount.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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: These screenshots require images: #1 (Upload plugin and install.), #2 (On the plugins panel activate the Halloween Countdown Widget.), #3 (In the widgets menu drag the Halloween Countdown Widget to your sidebar.), #4 (The Halloween Countdown Widget displays a cute Vampire countdown to Halloween in your sidebar!)
You can take inspiration from this readme.txt

halloween-countdown-widget/hallocount.php 92% from 13 tests

"Halloween Countdown Widget" version 2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("halloween-countdown-widget.php" instead of "hallocount.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171773

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/vampy.png14.63KB6.65KB▼ 54.56%
screenshot-4.png106.24KB46.16KB▼ 56.55%
screenshot-1.png22.93KB8.89KB▼ 61.21%
screenshot-3.png25.11KB7.46KB▼ 70.27%
screenshot-2.png14.74KB6.67KB▼ 54.71%