10% pcf-guy-fawkes-night-countdown

Code Review | PCF Guy Fawkes Night Countdown

WordPress plugin PCF Guy Fawkes Night Countdown scored10%from 54 tests.

About plugin

  • Plugin page: pcf-guy-fawkes-ni...
  • 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 /648 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
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/pcf-guy-fawkes-night-countdown/core/pcfcg-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfcg_Widget has a deprecated constructor

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

Server-side resources used by PCF Guy Fawkes Night Countdown
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.82 ▼37.92
Dashboard /wp-admin2.09 ▼1.215.93 ▼42.10
Posts /wp-admin/edit.php2.09 ▼1.265.53 ▼44.73
Add New Post /wp-admin/post-new.php2.09 ▼3.795.76 ▼94.62
Media Library /wp-admin/upload.php2.09 ▼1.135.86 ▼27.22

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_pcfcg_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by PCF Guy Fawkes Night Countdown
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.114.86 ▲2.7840.81 ▼8.70
Dashboard /wp-admin2,209 ▲214.86 ▼0.17109.41 ▲7.4740.80 ▼1.38
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.1038.89 ▼1.2636.16 ▲1.03
Add New Post /wp-admin/post-new.php1,514 ▼517.59 ▼5.63678.31 ▼2.7159.85 ▲8.02
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.0497.13 ▲1.7343.51 ▲1.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
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/pcf-guy-fawkes-night-countdown/core/pcfcg-widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; pcfcg_Widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_pcfcg_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pcf-guy-fawkes-night-countdown/pcf-guyfawkes-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_shortcode() in wp-content/plugins/pcf-guy-fawkes-night-countdown/core/pcfcg-countdown.php:115
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-guy-fawkes-night-countdown/core/pcfcg-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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 ('Sleeps' Countdown) image not found
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

pcf-guy-fawkes-night-countdown/pcf-guyfawkes-countdown-main.php 85% from 13 tests

The entry point to "PCF Guy Fawkes Night Countdown" version 1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pcf-guy-fawkes-night-countdown.php" instead of "pcf-guyfawkes-countdown-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected157 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44024157

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
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
There were not PNG files found in your plugin