89% holiday-mode-for-woocommerce

Code Review | Holiday Mode for WooCommerce

WordPress plugin Holiday Mode for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: holiday-mode-for-...
  • Plugin version: 1.7.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Sep 7, 2021
  • Latest release: Aug 29, 2023
  • Number of updates: 55
  • Update frequency: every 13.1 days
  • Top authors: hfranz (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /3,820 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.03MB] [CPU: ▼3.14ms] Passed 4 tests

This is a short check of server-side resources used by Holiday Mode for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.13 ▼2.49
Dashboard /wp-admin3.33 ▲0.0354.78 ▲1.36
Posts /wp-admin/edit.php3.38 ▲0.0346.40 ▼0.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.06 ▼10.51
Media Library /wp-admin/upload.php3.25 ▲0.0337.22 ▲3.23

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Holiday Mode for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.364.48 ▲2.5842.92 ▼0.22
Dashboard /wp-admin2,206 ▲215.87 ▼0.01107.46 ▼11.2335.94 ▼8.00
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0235.09 ▼5.0430.39 ▼3.11
Add New Post /wp-admin/post-new.php1,533 ▼023.10 ▼0.03685.68 ▼27.3963.50 ▲9.43
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0495.69 ▼22.3741.63 ▼3.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === holiday-mode-for-woocommerce === )
The official readme.txt might help

holiday-mode-for-woocommerce/holiday-mode-woocommerce.php 69% from 13 tests

This is the main PHP file of "Holiday Mode for WooCommerce" version 1.7.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.4" instead of "7.3")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("holiday-mode-for-woocommerce.php" instead of "holiday-mode-woocommerce.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.9" instead of "5.4")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin274 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33260139
PO File34248135

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin