10% pcf-christmas-countdown

Code Review | PCF Christmas Countdown

WordPress plugin PCF Christmas Countdown scored10%from 54 tests.

About plugin

  • Plugin page: pcf-christmas-cou...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Oct 6, 2015
  • Number of updates: 40
  • Update frequency: every 0.7 days
  • Top authors: PCFDev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,297 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
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/pcf-christmas-countdown/core/pcfcc-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfcc_Widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼59.05ms] Passed 4 tests

This is a short check of server-side resources used by PCF Christmas Countdown
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.395.24 ▼37.13
Dashboard /wp-admin2.10 ▼1.217.26 ▼48.85
Posts /wp-admin/edit.php2.10 ▼1.266.35 ▼51.26
Add New Post /wp-admin/post-new.php2.10 ▼3.795.72 ▼98.97
Media Library /wp-admin/upload.php2.10 ▼1.136.02 ▼29.72

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

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

Browser metrics Passed 4 tests

Checking browser requirements for PCF Christmas Countdown
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.011.81 ▲0.0443.96 ▼0.98
Dashboard /wp-admin2,195 ▲185.54 ▼0.1188.03 ▼0.0945.07 ▲1.24
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0435.53 ▼3.5735.96 ▲2.91
Add New Post /wp-admin/post-new.php1,531 ▼1423.22 ▲0.01681.61 ▲46.6558.67 ▼3.44
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.11121.57 ▲19.1755.04 ▲12.07

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/pcf-christmas-countdown/core/pcfcc-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfcc_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_pcfcc_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pcf-christmas-countdown/pcf-christmas-countdown-main.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-christmas-countdown/core/pcfcc-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pcf-christmas-countdown/core/pcfcc-countdown.php:115

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

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

This is the main PHP file of "PCF Christmas Countdown" version 2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("pcf-christmas-countdown.php" instead of "pcf-christmas-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 plugin155 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44224155

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected