Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.14MB] [CPU: ▼8.47ms] Passed 4 tests
Server-side resources used by Business Hours Indicator
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.60 ▲0.14 | 36.81 ▼1.73 |
Dashboard /wp-admin | 3.45 ▲0.14 | 43.84 ▼2.42 |
Posts /wp-admin/edit.php | 3.56 ▲0.20 | 50.26 ▲8.74 |
Add New Post /wp-admin/post-new.php | 6.03 ▲0.14 | 80.34 ▼30.48 |
Media Library /wp-admin/upload.php | 3.37 ▲0.14 | 36.55 ▲0.75 |
Business Hours Indicator /wp-admin/options-general.php?page=business-hours-indicator | 3.43 | 32.10 |
Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 87 new files
Database: no new tables, 10 new options
New WordPress options |
---|
widget_bhi_widget_displayopeninghours |
can_compress_scripts |
widget_bhi_widget_isopen |
widget_bhi_widget_isclosed |
widget_recent-posts |
widget_bhi_widget_displaybusinesshoursindicator |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Business Hours Indicator
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 14.72 ▲0.27 | 1.78 ▲0.19 | 40.80 ▼0.37 |
Dashboard /wp-admin | 2,207 ▲18 | 5.82 ▲0.89 | 104.55 ▼3.73 | 41.56 ▲0.71 |
Posts /wp-admin/edit.php | 2,093 ▲1 | 2.06 ▲0.04 | 35.43 ▼4.99 | 34.34 ▼2.83 |
Add New Post /wp-admin/post-new.php | 1,536 ▲5 | 21.15 ▲3.04 | 726.06 ▲79.02 | 61.79 ▲5.42 |
Media Library /wp-admin/upload.php | 1,392 ▲1 | 4.19 ▲0.01 | 97.00 ▲0.49 | 40.24 ▼5.67 |
Business Hours Indicator /wp-admin/options-general.php?page=business-hours-indicator | 3,211 | 2.38 | 50.26 | 30.12 |
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
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 10 options
- widget_bhi_widget_isclosed
- db_upgraded
- widget_theysaidso_widget
- widget_bhi_widget_isopen
- can_compress_scripts
- theysaidso_admin_options
- widget_bhi_widget_displayopeninghours
- widget_recent-posts
- widget_bhi_widget_displaybusinesshoursindicator
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
Please fix the following items
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/business-hours-indicator/core/templates/widget_form.php
- > /wp-content/plugins/business-hours-indicator/templates/ifopenclosed.php
- 32× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: model in wp-content/plugins/business-hours-indicator/templates/list.php on line 12
- > PHP Notice
Undefined variable: option_manager in wp-content/plugins/business-hours-indicator/core/templates/widget_form.php on line 7
- > PHP Fatal error
Uncaught TypeError: Argument 1 passed to render_normal_hours() must be of the type array, null given, called in wp-content/plugins/business-hours-indicator/templates/list.php on line 18 and defined in wp-content/plugins/business-hours-indicator/templates/_helpers.php:4
- > PHP Notice
Undefined variable: model in wp-content/plugins/business-hours-indicator/templates/ifopenclosed.php on line 8
- > PHP Notice
Undefined variable: model in wp-content/plugins/business-hours-indicator/templates/list.php on line 15
- > PHP Notice
Trying to get property 'has_current' of non-object in wp-content/plugins/business-hours-indicator/templates/list.php on line 17
- > PHP Fatal error
Uncaught Error: Class 'MABEL_BHI_LITE\\Core\\Config_Manager' not found in wp-content/plugins/business-hours-indicator/admin/views/sidebar-main.php:2
- > PHP Fatal error
Uncaught Error: Class 'MABEL_BHI_LITE\\Core\\Models\\Option' not found in wp-content/plugins/business-hours-indicator/core/models/class-custom-option.php:6
- > PHP Notice
Trying to get property 'show_location_error' of non-object in wp-content/plugins/business-hours-indicator/templates/ifopenclosed.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/business-hours-indicator/admin/views/sidebar-list.php:2
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: opening times, open times, closed, open indication, business hours...
business-hours-indicator/mabel-business-hours-indicator.php 92% from 13 tests
"Business Hours Indicator" version 2.3.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("business-hours-indicator.php" instead of "mabel-business-hours-indicator.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,813 lines of code in 54 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 52 | 731 | 89 | 2,802 |
JavaScript | 1 | 0 | 0 | 10 |
CSS | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 8.03 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 62.00 |
Average method complexity | 2.45 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 36 | |
▷ Abstract classes | 1 | 2.78% |
▷ Concrete classes | 35 | 97.22% |
▷ Final classes | 0 | 0.00% |
Methods | 147 | |
▷ Static methods | 13 | 8.84% |
▷ Public methods | 124 | 84.35% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 23 | 15.65% |
Functions | 25 | |
▷ Named functions | 6 | 24.00% |
▷ Anonymous functions | 19 | 76.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/bhilogo.png | 15.75KB | 9.01KB | ▼ 42.79% |