84% store-opening-closing-hours-manager

Code Review | Store Opening Closing Hours Manager

WordPress plugin Store Opening Closing Hours Manager scored84%from 54 tests.

About plugin

  • Plugin page: store-opening-clo...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jul 15, 2022
  • Latest release: Aug 27, 2023
  • Number of updates: 8
  • Update frequency: every 51.0 days
  • Top authors: sajjad67 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /1,850 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼3.85ms] Passed 4 tests

Analyzing server-side resources used by Store Opening Closing Hours Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.73 ▼0.64
Dashboard /wp-admin3.31 ▼0.0445.48 ▼14.45
Posts /wp-admin/edit.php3.36 ▲0.0043.58 ▲1.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.16 ▼1.87
Media Library /wp-admin/upload.php3.23 ▲0.0034.29 ▲1.56

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Store Opening Closing Hours Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.32 ▼0.031.73 ▼0.1144.56 ▼0.05
Dashboard /wp-admin2,198 ▲215.61 ▲0.0882.04 ▼16.9941.68 ▼1.18
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0136.79 ▲0.6034.29 ▲1.03
Add New Post /wp-admin/post-new.php1,526 ▼1223.11 ▲0.04648.99 ▼42.1947.90 ▼14.61
Media Library /wp-admin/upload.php1,397 ▼04.21 ▼0.0398.70 ▼2.8244.21 ▲1.69

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/store-opening-closing-hours-manager/includes/shortcode.php
    • > /wp-content/plugins/store-opening-closing-hours-manager/includes/admin_settings.php
    • > /wp-content/plugins/store-opening-closing-hours-manager/includes/public.php
    • > /wp-content/plugins/store-opening-closing-hours-manager/includes/util.php
    • > /wp-content/plugins/store-opening-closing-hours-manager/includes/widget.php
    • > /wp-content/plugins/store-opening-closing-hours-manager/includes/admin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: store-closing-opening, shop-manager, store-manager, shop-closing-opening, woocommerce

store-opening-closing-hours-manager/store-opening-closing-hours-manager.php Passed 13 tests

The main file in "Store Opening Closing Hours Manager" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
86 characters long description:
Setup your Woocomerce store opening and closing hours to manage your business at ease!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,722 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP84302801,820
JavaScript5139359504
CSS46219398

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity29.71
▷ Minimum class complexity2.00
▷ Maximum class complexity92.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods55
▷ Static methods1527.27%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions654.55%
▷ Anonymous functions545.45%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin