88% advent-calender

Code Review | Advent Calendar

WordPress plugin Advent Calendar scored 88% from 54 tests.

About plugin

  • Plugin page: advent-calender
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-4.0
  • WordPress version: 5.9.2
  • First release: Nov 29, 2013
  • Latest release: Sep 21, 2014
  • Number of updates: 31
  • Update frequency: every 9.6 days
  • Top authors: bassgang (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 7,747 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼295.93ms] Passed 4 tests

An overview of server-side resources used by Advent Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0953.22 ▼0.16
Dashboard /wp-admin3.48 ▲0.0740.18 ▲8.05
Posts /wp-admin/edit.php3.71 ▲0.0738.79 ▼0.19
Add New Post /wp-admin/post-new.php6.94 ▼0.0394.23 ▼1,186.36
Media Library /wp-admin/upload.php3.36 ▲0.0626.62 ▲3.01
Advent calendar entries /wp-admin/edit.php?post_type=acal_entry3.4526.68
Bulk creation /wp-admin/edit.php?post_type=acal_entry&page=acal-creation-tool3.3323.41

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advent Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,804 ▲5015.91 ▲0.366.71 ▲0.262.39 ▼0.17
Dashboard /wp-admin2,927 ▲766.13 ▼0.04117.20 ▼15.41157.82 ▲0.62
Posts /wp-admin/edit.php2,726 ▲323.24 ▲0.0066.74 ▲4.20139.29 ▼0.47
Add New Post /wp-admin/post-new.php1,783 ▲11516.94 ▼1.55410.89 ▲3.93159.05 ▲0.01
Media Library /wp-admin/upload.php1,736 ▲355.52 ▲0.03134.54 ▼9.60184.50 ▼0.01
Advent calendar entries /wp-admin/edit.php?post_type=acal_entry1,3993.1660.25113.21
Bulk creation /wp-admin/edit.php?post_type=acal_entry&page=acal-creation-tool1,0242.3953.2899.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advent-calender/admin/views/bulk-creation-footer.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/advent-calender/public/views/shortcode-entry-published.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advent-calender/admin/views/bulk-creation-message.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advent-calender/admin/views/bulk-creation-header.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/advent-calender/public/views/single-advent-calendar-entry-custom.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_date() in wp-content/plugins/advent-calender/public/views/shortcode-entry-future.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/advent-calender/public/views/single-advent-calendar-entry.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/advent-calender/admin/views/admin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advent-calender/admin/views/bulk-creation-form.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: flexible, advent, calendar, christmas

advent-calender/advent-calendar.php 85% from 13 tests

The entry point to "Advent Calendar" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advent-calender.php" instead of "advent-calendar.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected401 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14145392381
CSS12020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.50
▷ Minimum class complexity6.00
▷ Maximum class complexity17.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods736.84%
▷ Public methods1473.68%
▷ Protected methods00.00%
▷ Private methods526.32%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
PNG images were not found in this plugin