89% order-hours-scheduler-for-woocommerce

Code Review | Store Hours for WooCommerce

WordPress plugin Store Hours for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: order-hours-sched...
  • Plugin version: 4.3.17
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 7, 2018
  • Latest release: Mar 24, 2023
  • Number of updates: 123
  • Update frequency: every 14.5 days
  • Top authors: bizswoop (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

3,000+ active /70,954 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.40ms] Passed 4 tests

An overview of server-side resources used by Store Hours for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0829.74 ▼10.42
Dashboard /wp-admin3.35 ▲0.0546.58 ▼0.57
Posts /wp-admin/edit.php3.47 ▲0.1146.86 ▼0.58
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.29 ▼3.74
Media Library /wp-admin/upload.php3.28 ▲0.0434.73 ▼2.85

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

Browser metrics Passed 4 tests

A check of browser resources used by Store Hours for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,479 ▼26713.62 ▼0.740.53 ▼1.2018.84 ▼25.21
Dashboard /wp-admin2,220 ▲354.89 ▼0.17111.46 ▲3.7741.87 ▲3.12
Posts /wp-admin/edit.php2,103 ▲142.05 ▲0.0134.33 ▼2.1435.42 ▲2.65
Add New Post /wp-admin/post-new.php1,523 ▼1017.72 ▼5.49664.01 ▼10.9464.86 ▲12.35
Media Library /wp-admin/upload.php1,399 ▲114.32 ▲0.1496.46 ▼0.1344.16 ▲1.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 51 tag instead of maximum 10
You can look at the official readme.txt

order-hours-scheduler-for-woocommerce/index.php 77% from 13 tests

"Store Hours for WooCommerce" version 4.3.17's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0" instead of "2.4.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("order-hours-scheduler-for-woocommerce.php" instead of "index.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 plugin49,980 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
SVG501332,152
CSS44,1705313,755
PHP36542603,634
JavaScript45449439

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes33
▷ Abstract classes39.09%
▷ Concrete classes3090.91%
▷ Final classes00.00%
Methods193
▷ Static methods3819.69%
▷ Public methods16987.56%
▷ Protected methods168.29%
▷ Private methods84.15%
Functions84
▷ Named functions2226.19%
▷ Anonymous functions6273.81%
Constants32
▷ Global constants39.38%
▷ Class constants2990.62%
▷ Public constants29100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.57MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png93.64KB244.55KB0.00%
assets/chevron-sign-to-right.png9.78KB6.46KB▼ 33.95%
assets/screenshot-1.png73.78KB21.08KB▼ 71.43%
assets/bizswoop.png12.40KB6.43KB▼ 48.13%
assets/banner-1544x500.png65.98KB18.43KB▼ 72.06%