83% holiday-class-post-calendar

Code Review | Holiday class post calendar

WordPress plugin Holiday class post calendar scored83%from 54 tests.

About plugin

  • Plugin page: holiday-class-pos...
  • Plugin version: 7.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: May 10, 2016
  • Latest release: Feb 28, 2023
  • Number of updates: 40
  • Update frequency: every 62.2 days
  • Top authors: strix-bubol5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,350 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.47ms] Passed 4 tests

An overview of server-side resources used by Holiday class post calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.23 ▲1.23
Dashboard /wp-admin3.33 ▲0.0343.12 ▼2.85
Posts /wp-admin/edit.php3.44 ▲0.0847.41 ▲2.98
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.49 ▼9.65
Media Library /wp-admin/upload.php3.25 ▲0.0232.65 ▼2.60
Holiday-class Post Calendar Option /wp-admin/options-general.php?page=hldycls_pcldr_plugin_options3.4330.25

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Holiday class post calendar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.25 ▼1.501.67 ▲0.0241.24 ▲3.38
Dashboard /wp-admin2,210 ▲184.86 ▼0.13113.45 ▲6.9138.86 ▼3.79
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0138.10 ▲3.0734.94 ▲3.13
Add New Post /wp-admin/post-new.php1,545 ▲1018.48 ▼4.75591.77 ▼98.8352.46 ▼2.57
Media Library /wp-admin/upload.php1,392 ▲104.22 ▲0.0194.04 ▼2.9144.45 ▼0.29
Holiday-class Post Calendar Option /wp-admin/options-general.php?page=hldycls_pcldr_plugin_options2,0632.0626.22234.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/holiday-class-post-calendar/table_layout.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/holiday-class-post-calendar/table_layout.php on line 5
    • > PHP Notice
      Undefined variable: prm in wp-content/plugins/holiday-class-post-calendar/table_layout.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/holiday-class-post-calendar/holiday_class_post_calendar.php:85
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/holiday-class-post-calendar/explain.php:13
    • > PHP Notice
      Undefined variable: prm in wp-content/plugins/holiday-class-post-calendar/table_layout.php on line 5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/holiday-class-post-calendar/table_layout.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Japanese type. English type.), #2 (Option page.), #3 (Explain section.)
You can look at the official readme.txt

holiday-class-post-calendar/holiday_class_post_calendar.php 85% from 13 tests

The principal PHP file in "Holiday class post calendar" v. 7.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("holiday-class-post-calendar.php" instead of "holiday_class_post_calendar.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,375 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP43181591,777
CSS4102102390
JavaScript152208

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 120)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity176.00
▷ Minimum class complexity176.00
▷ Maximum class complexity176.00
Average method complexity10.21
▷ Minimum method complexity1.00
▷ Maximum method complexity120.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin