10% halloween-countdown-widget

Code Review | Halloween Countdown Widget

WordPress plugin Halloween Countdown Widget scored 10% from 54 tests.

About plugin

  • Plugin page: halloween-countdo...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.2
  • WordPress version: 5.9.2
  • First release: Oct 6, 2012
  • Latest release: Oct 11, 2021
  • Number of updates: 18
  • Update frequency: every 182.9 days
  • Top authors: monkeymays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,585 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > 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: ▼2.49MB] [CPU: ▼351.87ms] Passed 4 tests

A check of server-side resources used by Halloween Countdown Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼1.643.76 ▼45.35
Dashboard /wp-admin1.90 ▼1.513.41 ▼31.01
Posts /wp-admin/edit.php1.90 ▼1.743.61 ▼34.00
Add New Post /wp-admin/post-new.php1.90 ▼5.084.07 ▼1,297.13
Media Library /wp-admin/upload.php1.90 ▼1.403.51 ▼22.12

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
widget_hallocount

Browser metrics Passed 4 tests

An overview of browser requirements for Halloween Countdown Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5316.14 ▲0.506.26 ▼0.072.95 ▲0.72
Dashboard /wp-admin2,895 ▲416.12 ▼0.10114.04 ▼17.81156.13 ▲0.40
Posts /wp-admin/edit.php2,688 ▼63.24 ▲0.0063.47 ▲0.33137.71 ▼5.96
Add New Post /wp-admin/post-new.php1,667 ▼8819.56 ▲1.59397.09 ▼4.61154.41 ▲2.43
Media Library /wp-admin/upload.php1,698 ▼05.53 ▲0.02135.18 ▼9.58190.12 ▲2.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught 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
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_hallocount

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #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!)
The official readme.txt might help

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

The principal PHP file in "Halloween Countdown Widget" v. 2.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171773

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
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%
img/vampy (2).png14.63KB6.65KB▼ 54.56%
screenshot-4.png106.24KB46.16KB▼ 56.55%
screenshot-3.png25.11KB7.46KB▼ 70.27%
screenshot-1.png22.93KB8.89KB▼ 61.21%