10% diwali-countdown

Code Review | Diwali Countdown

WordPress plugin Diwali Countdown scored 10% from 54 tests.

About plugin

  • Plugin page: diwali-countdown
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 12, 2012
  • Latest release: Oct 11, 2013
  • Number of updates: 17
  • Update frequency: every 21.4 days
  • Top authors: shardulpandey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,151 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
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/diwali-countdown/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: ▼50.66ms] Passed 4 tests

An overview of server-side resources used by Diwali Countdown
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.406.40 ▼36.36
Dashboard /wp-admin2.08 ▼1.225.39 ▼40.84
Posts /wp-admin/edit.php2.08 ▼1.275.27 ▼41.90
Add New Post /wp-admin/post-new.php2.08 ▼3.816.58 ▼83.53
Media Library /wp-admin/upload.php2.08 ▼1.155.82 ▼26.32

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_hallocount
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Diwali Countdown
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.54 ▼1.241.72 ▼0.6838.31 ▼10.81
Dashboard /wp-admin2,206 ▲155.84 ▲0.9496.60 ▼11.3037.24 ▼10.48
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0340.65 ▲1.4835.32 ▼1.99
Add New Post /wp-admin/post-new.php1,533 ▲1923.22 ▲5.64631.44 ▼61.6156.25 ▼3.60
Media Library /wp-admin/upload.php1,391 ▼04.26 ▲0.0497.82 ▼1.8047.18 ▲0.11

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/diwali-countdown/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: 7 options
    • widget_hallocount
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/diwali-countdown/hallocount.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Diwali Countdown Widget.) image missing
You can look at the official readme.txt

diwali-countdown/hallocount.php 92% from 13 tests

The primary PHP file in "Diwali Countdown" version 2.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("diwali-countdown.php" instead of "hallocount.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1161756

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 1.24MB with 0.87MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/vampy (2).png581.02KB173.89KB▼ 70.07%
screenshot-1.png108.82KB32.47KB▼ 70.16%
img/vampy.png581.02KB173.89KB▼ 70.07%