10% pcf-new-year-countdown

Code Review | PCF New Year Countdown

WordPress plugin PCF New Year Countdown scored10%from 54 tests.

About plugin

  • Plugin page: pcf-new-year-coun...
  • 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: 12
  • Update frequency: every 2.0 days
  • Top authors: PCFDev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,244 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/pcf-new-year-countdown/core/pcfcny-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfcny_Widget has a deprecated constructor

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

Server-side resources used by PCF New Year Countdown
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.40 ▼39.60
Dashboard /wp-admin2.09 ▼1.215.23 ▼48.21
Posts /wp-admin/edit.php2.09 ▼1.267.80 ▼42.71
Add New Post /wp-admin/post-new.php2.09 ▼3.796.11 ▼101.49
Media Library /wp-admin/upload.php2.09 ▼1.145.45 ▼33.94

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for PCF New Year Countdown
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.061.61 ▼0.4742.43 ▼0.81
Dashboard /wp-admin2,198 ▲215.57 ▲0.0489.78 ▼3.7538.44 ▼8.01
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0143.46 ▲9.0034.69 ▼1.39
Add New Post /wp-admin/post-new.php1,528 ▲222.83 ▼0.61678.35 ▼13.3563.38 ▲9.86
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.03100.38 ▼8.8745.97 ▼2.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/pcf-new-year-countdown/core/pcfcny-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfcny_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_pcfcny_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pcf-new-year-countdown/pcf-newyear-countdown-main.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-new-year-countdown/core/pcfcny-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pcf-new-year-countdown/core/pcfcny-countdown.php:115

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 ('Sleeps' Countdown) image missing
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

pcf-new-year-countdown/pcf-newyear-countdown-main.php 85% from 13 tests

The main file in "PCF New Year Countdown" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pcf-new-year-countdown.php" instead of "pcf-newyear-countdown-main.php")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin157 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44024157

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected