10% pcf-thanksgiving-countdown

Code Review | PCF Thanksgiving Countdown

WordPress plugin PCF Thanksgiving Countdown scored10%from 54 tests.

About plugin

  • Plugin page: pcf-thanksgiving-...
  • 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: 15
  • Update frequency: every 1.6 days
  • Top authors: PCFDev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /867 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/pcf-thanksgiving-countdown/core/pcfct-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfct_Widget has a deprecated constructor

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

This is a short check of server-side resources used by PCF Thanksgiving Countdown
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.83 ▼42.27
Dashboard /wp-admin2.09 ▼1.216.36 ▼42.15
Posts /wp-admin/edit.php2.09 ▼1.265.82 ▼44.65
Add New Post /wp-admin/post-new.php2.09 ▼3.796.80 ▼84.83
Media Library /wp-admin/upload.php2.09 ▼1.145.56 ▼31.66

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

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

Browser metrics Passed 4 tests

PCF Thanksgiving Countdown: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.68 ▲0.0244.32 ▲2.81
Dashboard /wp-admin2,198 ▲185.62 ▼0.0388.12 ▲2.2742.09 ▲0.58
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.0336.65 ▼1.4432.47 ▼5.19
Add New Post /wp-admin/post-new.php1,531 ▼421.03 ▲3.07658.35 ▲13.6165.69 ▼3.36
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0497.66 ▼5.3644.41 ▼0.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/pcf-thanksgiving-countdown/core/pcfct-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfct_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_pcfct_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pcf-thanksgiving-countdown/pcf-thanksgiving-countdown-main.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-thanksgiving-countdown/core/pcfct-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pcf-thanksgiving-countdown/core/pcfct-countdown.php:115

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 ('Sleeps' Countdown) image not found
Please take inspiration from this readme.txt

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

The main file in "PCF Thanksgiving Countdown" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pcf-thanksgiving-countdown.php" instead of "pcf-thanksgiving-countdown-main.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected157 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44024157

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin