10% wc-holiday

Code Review | Holiday for WooCommerce

WordPress plugin Holiday for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: wc-holiday
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2021
  • Latest release: Mar 29, 2023
  • Number of updates: 8
  • Update frequency: every 93.0 days
  • Top authors: Paul-M-UK (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /411 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wc-holiday/wc-holiday.php+101
    Undefined index: WCH-field-1-2

Server metrics [RAM: ▼1.92MB] [CPU: ▼57.57ms] Passed 4 tests

An overview of server-side resources used by Holiday for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.61 ▼44.50
Dashboard /wp-admin2.09 ▼1.226.76 ▼44.54
Posts /wp-admin/edit.php2.09 ▼1.276.05 ▼44.86
Add New Post /wp-admin/post-new.php2.09 ▼3.805.78 ▼96.36
Media Library /wp-admin/upload.php2.09 ▼1.146.12 ▼27.88
Holiday for WooCommerce /wp-admin/admin.php?page=wc-holiday2.096.98

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Holiday for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.30 ▼0.051.94 ▲0.1042.80 ▼2.11
Dashboard /wp-admin2,195 ▲215.64 ▲0.0284.19 ▼5.4938.94 ▼6.45
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0635.34 ▼5.2133.46 ▼1.92
Add New Post /wp-admin/post-new.php1,554 ▲2018.22 ▼5.03618.18 ▼99.6050.94 ▼7.86
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.00106.84 ▼2.1845.10 ▼1.11
Holiday for WooCommerce /wp-admin/admin.php?page=wc-holiday8052.0626.1830.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wc-holiday/wc-holiday.php+101
    Undefined index: WCH-field-1-2
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wc-holiday
    • > Notice in wp-content/plugins/wc-holiday/wc-holiday.php+67
    Undefined index: WCH-field-1-2
    • > GET request to /wp-admin/admin.php?page=wc-holiday
    • > Warning in wp-admin/includes/template.php+1771
    call_user_func() expects parameter 1 to be a valid callback, function 'WCH_section1' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=wc-holiday
    • > Notice in wp-content/plugins/wc-holiday/wc-holiday.php+59
    Undefined index: WCH-field-1-1

SRP 50% 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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-holiday/wc-holiday.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2 in wc-holiday/assets to your readme.txt
Please take inspiration from this readme.txt

wc-holiday/wc-holiday.php Passed 13 tests

The entry point to "Holiday for WooCommerce" version 1.1 is a PHP file that has certain tags in its header comment area
54 characters long description:
This plugin gives basic options to disable WooCommerce

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
Everything looks great! No dangerous files found in this plugin78 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1302278

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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