84% the-holiday-calendar

Code Review | The Holiday Calendar

WordPress plugin The Holiday Calendar scored 84% from 54 tests.

About plugin

  • Plugin page: the-holiday-calendar
  • Plugin version: 1.18.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2014
  • Latest release: Dec 2, 2022
  • Number of updates: 336
  • Update frequency: every 8.8 days
  • Top authors: mva7 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

900+ active / 44,888 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.39MB] [CPU: ▲6.62ms] Passed 4 tests

Server-side resources used by The Holiday Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4248.52 ▲3.55
Dashboard /wp-admin3.73 ▲0.4357.40 ▲11.43
Posts /wp-admin/edit.php3.77 ▲0.4160.89 ▲11.46
Add New Post /wp-admin/post-new.php6.25 ▲0.36104.13 ▲4.32
Media Library /wp-admin/upload.php3.59 ▲0.3645.89 ▲7.16
Add New /wp-admin/post-new.php?post_type=thc-events3.7758.68
Events /wp-admin/edit.php?post_type=thc-events3.6845.08
Settings /wp-admin/edit.php?post_type=thc-events&page=events3.5640.67

Server storage [IO: ▲0.12MB] [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: 46 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
thc_settings
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_the_holiday_calendar

Browser metrics Passed 4 tests

Checking browser requirements for The Holiday Calendar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲20513.55 ▼0.836.33 ▲4.1739.60 ▼0.44
Dashboard /wp-admin2,240 ▲525.88 ▲0.03105.79 ▼10.9942.08 ▼8.54
Posts /wp-admin/edit.php2,120 ▲312.01 ▼0.0439.61 ▼0.2635.06 ▼6.87
Add New Post /wp-admin/post-new.php1,539 ▲322.66 ▲1.44614.22 ▼77.0455.50 ▼8.33
Media Library /wp-admin/upload.php1,416 ▲344.17 ▼0.0396.95 ▼10.1745.54 ▲0.81
Add New /wp-admin/post-new.php?post_type=thc-events2,2737.84188.9374.08
Events /wp-admin/edit.php?post_type=thc-events1,1241.9632.4732.43
Settings /wp-admin/edit.php?post_type=thc-events&page=events9182.0324.0736.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • widget_the_holiday_calendar
    • theysaidso_admin_options
    • thc_settings
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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 50% 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 items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'thc_helper' not found in wp-content/plugins/the-holiday-calendar/posts/views/page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-holiday-calendar/the-holiday-calendar.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_content() in wp-content/plugins/the-holiday-calendar/posts/views/dayView.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
The official readme.txt is a good inspiration

the-holiday-calendar/the-holiday-calendar.php Passed 13 tests

"The Holiday Calendar" version 1.18.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
28 characters long description:
Shows the upcoming holidays.

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
There were no executable files found in this plugin2,854 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP273771351,669
PO File84294341,025
CSS2344160

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.81
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods103
▷ Static methods8279.61%
▷ Public methods103100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants00.00%
▷ Class constants25100.00%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin