10% pcf-halloween-countdown

Code Review | PCF Halloween Countdown

WordPress plugin PCF Halloween Countdown scored10%from 54 tests.

About plugin

  • Plugin page: pcf-halloween-cou...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 14, 2015
  • Latest release: Oct 6, 2015
  • Number of updates: 13
  • Update frequency: every 1.9 days
  • Top authors: PCFDev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /736 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/pcf-halloween-countdown/core/pcfch-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfch_Widget has a deprecated constructor

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.92ms] Passed 4 tests

A check of server-side resources used by PCF Halloween Countdown
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.31 ▲5.10
Dashboard /wp-admin3.31 ▼0.0343.23 ▼11.13
Posts /wp-admin/edit.php3.36 ▲0.0141.59 ▼7.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.19 ▼14.20
Media Library /wp-admin/upload.php3.24 ▲0.0135.56 ▲1.19

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_pcfch_widget
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by PCF Halloween Countdown
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.20 ▼1.181.79 ▼0.2743.57 ▲3.40
Dashboard /wp-admin2,206 ▲184.86 ▼0.05101.83 ▼6.7242.03 ▼0.70
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0636.54 ▼4.9231.54 ▼3.67
Add New Post /wp-admin/post-new.php1,519 ▼023.27 ▲0.11660.58 ▲23.9453.29 ▼2.33
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0798.93 ▼5.9141.40 ▼2.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_pcfch_widget
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pcf-halloween-countdown/pcf-halloween-countdown-main.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pcf-halloween-countdown/core/pcfch-countdown.php:115
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-halloween-countdown/core/pcfch-widget.php:5

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 errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 ('Sleeps' Countdown)
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

pcf-halloween-countdown/pcf-halloween-countdown-main.php 85% from 13 tests

The entry point to "PCF Halloween Countdown" version 1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pcf-halloween-countdown.php" instead of "pcf-halloween-countdown-main.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
Success! There were no dangerous files found in this plugin157 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44024157

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ 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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin