10% dead-panda-countdown

Code Review | Dead Panda Countdown

WordPress plugin Dead Panda Countdown scored10%from 54 tests.

About plugin

  • Plugin page: dead-panda-countdown
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Dec 1, 2015
  • Number of updates: 21
  • Update frequency: every 1.1 days
  • Top authors: projectpa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,054 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/dead-panda-countdown/modules/widgets.php+56
    Function create_function() is deprecated

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

Analyzing server-side resources used by Dead Panda Countdown
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.416.43 ▼36.91
Dashboard /wp-admin2.08 ▼1.236.63 ▼43.89
Posts /wp-admin/edit.php2.08 ▼1.286.03 ▼42.67
Add New Post /wp-admin/post-new.php2.08 ▼3.816.91 ▼92.06
Media Library /wp-admin/upload.php2.08 ▼1.156.35 ▼30.75

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 62 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_panda_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Dead Panda Countdown
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲31915.48 ▲1.115.48 ▲3.6746.06 ▲0.34
Dashboard /wp-admin2,348 ▲1576.55 ▲1.67143.89 ▲27.8638.62 ▼10.15
Posts /wp-admin/edit.php2,260 ▲1713.34 ▲1.3056.86 ▲19.2035.01 ▼1.92
Add New Post /wp-admin/post-new.php1,537 ▲1723.17 ▲0.02661.65 ▲26.0236.29 ▼20.82
Media Library /wp-admin/upload.php1,388 ▼04.00 ▼0.2386.48 ▼10.2442.41 ▼1.73

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/dead-panda-countdown/modules/widgets.php+56
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_panda_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/dead-panda-countdown/modules/starter.php
    • > /wp-content/plugins/dead-panda-countdown/starter.php
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dead-panda-countdown/modules/scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dead-panda-countdown/modules/widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dead-panda-countdown/modules/shortcodes.php:2
    • > PHP Warning
      fread() expects parameter 1 to be resource, bool given in wp-content/plugins/dead-panda-countdown/starter.php on line 9
    • > PHP Warning
      filesize(): stat failed for timer in wp-content/plugins/dead-panda-countdown/starter.php on line 9
    • > PHP Warning
      fclose() expects parameter 1 to be resource, bool given in wp-content/plugins/dead-panda-countdown/modules/starter.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/dead-panda-countdown/modules/hooks.php:2
    • > PHP Warning
      filesize(): stat failed for timer in wp-content/plugins/dead-panda-countdown/modules/starter.php on line 9
    • > PHP Warning
      fclose() expects parameter 1 to be resource, bool given in wp-content/plugins/dead-panda-countdown/starter.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/dead-panda-countdown/modules/goodtobebad-template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Shows how the plugin looks like.) image missing
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

dead-panda-countdown/wp-dead-panda-countdown.php 85% from 13 tests

"Dead Panda Countdown" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 173 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dead-panda-countdown.php" instead of "wp-dead-panda-countdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin23,761 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
CSS91,08517519,288
JavaScript45073341,218
Sass1319221,158
LESS1319311,149
SVG100504
PHP1211940444

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions10
▷ Named functions10100.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
4 compressed PNG files occupy 0.04MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/inc/assets/css/glyphicons-halflings-white.png8.57KB9.20KB0.00%