84% woc-open-close

Code Review | Open Close WooCommerce Store - Best Business Schedules Manager

WordPress plugin Open Close WooCommerce Store - Best Business Schedules Manager scored84%from 54 tests.

About plugin

  • Plugin page: woc-open-close
  • Plugin version: 4.8.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 15, 2015
  • Latest release: Nov 26, 2023
  • Number of updates: 181
  • Update frequency: every 16.7 days
  • Top authors: jaedm97 (77.9%)pluginbazar (22.65%)

Code review

54 tests

User reviews

37 reviews

Install metrics

4,000+ active /61,520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by Open Close WooCommerce Store - Best Business Schedules Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.17 ▼4.11
Dashboard /wp-admin3.35 ▲0.0544.28 ▼3.60
Posts /wp-admin/edit.php3.40 ▲0.0549.44 ▲3.80
Add New Post /wp-admin/post-new.php5.93 ▲0.0583.68 ▼2.19
Media Library /wp-admin/upload.php3.27 ▲0.0434.56 ▲2.04

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Open Close WooCommerce Store - Best Business Schedules Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.27 ▼0.091.83 ▲0.0544.57 ▼3.92
Dashboard /wp-admin2,198 ▲205.61 ▼0.0594.00 ▼5.0242.24 ▲4.39
Posts /wp-admin/edit.php2,103 ▼01.97 ▲0.0339.72 ▼1.6435.04 ▲1.42
Add New Post /wp-admin/post-new.php1,526 ▼022.81 ▼0.23668.19 ▲78.8457.46 ▲4.90
Media Library /wp-admin/upload.php1,391 ▼124.16 ▼0.1195.91 ▼3.1745.04 ▲1.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WPDK\\Utils' not found in wp-content/plugins/woc-open-close/templates/admin/single-schedule.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPDK_Settings_Abstract' not found in wp-content/plugins/woc-open-close/includes/wpdk/settings/classes/admin-options.class.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woc-open-close/includes/classes/class-hooks.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WPDK_Settings_Abstract' not found in wp-content/plugins/woc-open-close/includes/wpdk/settings/classes/fields.class.php:11

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were detected

woc-open-close/woc-open-close.php Passed 13 tests

"Open Close WooCommerce Store - Best Business Schedules Manager" version 4.8.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
116 characters long description:
Open Close WooCommerce store automatically with predefined schedules. Stop getting orders when your store is closed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected28,120 lines of code in 131 files:
LanguageFilesBlank linesComment linesLines of code
CSS131,96073110,242
PHP983,2971,7699,867
JavaScript111,5965777,800
PO File17980191
Markdown18013
SVG7007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity25.70
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity6.13
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes71
▷ Abstract classes22.82%
▷ Concrete classes6997.18%
▷ Final classes00.00%
Methods342
▷ Static methods4613.45%
▷ Public methods34199.71%
▷ Protected methods00.00%
▷ Private methods10.29%
Functions43
▷ Named functions3990.70%
▷ Anonymous functions49.30%
Constants8
▷ Global constants8100.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
17 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.13KB0.11KB▼ 11.72%
assets/images/ui-bg_glass_65_ffffff_1x400.png0.14KB0.08KB▼ 40.41%
assets/images/ui-icons_1222222_256x240.png3.19KB3.49KB0.00%
assets/images/support-open.png4.97KB1.35KB▼ 72.89%
assets/images/ui-bg_glass_75_e6e6e6_1x400.png0.23KB0.11KB▼ 51.05%