78% pcf-birthday-countdown

Code Review | PCF Birthday Countdown

WordPress plugin PCF Birthday Countdown scored78%from 54 tests.

About plugin

  • Plugin page: pcf-birthday-coun...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 11, 2015
  • Latest release: Oct 6, 2015
  • Number of updates: 27
  • Update frequency: every 1.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 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by PCF Birthday Countdown
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.09 ▼3.55
Dashboard /wp-admin3.31 ▼0.0344.85 ▼12.22
Posts /wp-admin/edit.php3.36 ▲0.0145.56 ▼2.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.19 ▼1.15
Media Library /wp-admin/upload.php3.24 ▲0.0134.78 ▼0.24

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PCF Birthday Countdown
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼0.814.42 ▲2.5339.40 ▼14.30
Dashboard /wp-admin2,209 ▲215.88 ▲1.00104.43 ▼0.9238.99 ▼3.34
Posts /wp-admin/edit.php2,089 ▲32.00 ▼0.0538.40 ▲0.9131.62 ▼1.31
Add New Post /wp-admin/post-new.php1,533 ▲1223.49 ▲0.33633.03 ▲1.9249.82 ▼4.28
Media Library /wp-admin/upload.php1,388 ▲94.19 ▼0.0396.09 ▼6.7342.13 ▼1.93

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 were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pcf-birthday-countdown/pcf-birthday-countdown-main.php
  • 3× 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-birthday-countdown/core/pcfcb-countdown.php:139
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-birthday-countdown/core/pcfcb-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-birthday-countdown/core/pcfcb-widget.php:5

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 ('Sleeps' Countdown)
You can take inspiration from this readme.txt

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

"PCF Birthday Countdown" version 2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pcf-birthday-countdown.php" instead of "pcf-birthday-countdown-main.php")

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
There were no executable files found in this plugin240 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP55934240

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions12
▷ Named functions12100.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 images were found in this plugin