Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▼1.73MB] [CPU: ▼45.86ms] Passed 4 tests
This is a short check of server-side resources used by Business Hours Plugin
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.23 ▼1.23 | 7.83 ▼30.60 |
Dashboard /wp-admin | 2.29 ▼1.02 | 11.08 ▼35.07 |
Posts /wp-admin/edit.php | 2.29 ▼1.07 | 9.59 ▼34.88 |
Add New Post /wp-admin/post-new.php | 2.29 ▼3.60 | 11.75 ▼82.88 |
Media Library /wp-admin/upload.php | 2.29 ▼0.94 | 10.49 ▼22.05 |
Business Hours /wp-admin/options-general.php?page=business-hours | 2.29 | 10.16 |
Server storage [IO: ▲0.58MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
widget_workinghourswidget |
Browser metrics Passed 4 tests
A check of browser resources used by Business Hours Plugin
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.35 ▼0.00 | 1.79 ▲0.09 | 44.98 ▲4.29 |
Dashboard /wp-admin | 2,193 ▲13 | 5.55 ▼0.11 | 86.83 ▼1.01 | 37.35 ▼9.57 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.03 ▼0.01 | 37.10 ▼0.42 | 35.10 ▲0.76 |
Add New Post /wp-admin/post-new.php | 1,531 ▲3 | 23.03 ▲0.04 | 646.10 ▼41.97 | 53.16 ▲3.24 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.16 ▼0.04 | 95.49 ▼6.17 | 44.14 ▼1.44 |
Business Hours /wp-admin/options-general.php?page=business-hours | 1,367 | 2.01 | 21.60 | 40.32 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/business-hours-plugin/lib/BusinessHoursWidget.class.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; BusinessHoursWidget has a deprecated constructor
- Zombie WordPress options detected upon uninstall: 7 options
- can_compress_scripts
- widget_workinghourswidget
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=business-hours
- > Deprecated in wp-content/plugins/business-hours-plugin/lib/BusinessHoursWidget.class.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; BusinessHoursWidget has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=business-hours
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in BusinessHoursWidget is deprecated since version 4.3.0! Use __construct() instead.
- > GET request to /wp-admin/options-general.php?page=business-hours
- > Notice in wp-content/plugins/business-hours-plugin/lib/BusinessHoursExceptions.class.php+177
Trying to access array offset on value of type bool
SRP 0% 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
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/business-hours-plugin/views/table-row.php
- 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/business-hours-plugin/views/settings.php:3
- > PHP Notice
Undefined variable: closed_text in wp-content/plugins/business-hours-plugin/views/table-row.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/business-hours-plugin/views/table.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-hours-plugin/widget.php:3
- > PHP Notice
Undefined variable: collapsible_link in wp-content/plugins/business-hours-plugin/views/table.php on line 1
- > PHP Notice
Undefined variable: is_open_today in wp-content/plugins/business-hours-plugin/views/table-row.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/business-hours-plugin/views/settings-exceptions.php:5
- > PHP Notice
Undefined variable: day_name in wp-content/plugins/business-hours-plugin/views/table-row.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/business-hours-plugin/views/settings-exception-instructions.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/business-hours-plugin/views/settings-days.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Screenshots: Please add images for these screenshots: #1 (Business Hours Settings), #2 (Exceptions Settings), #3 (Widget Settings), #4 (Front-End Widget: Closed), #5 (Front-End Widget: Working), #6 (Front-End Widget: Full week, with an exception)
business-hours-plugin/working-hours.php 92% from 13 tests
The main file in "Business Hours Plugin" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("business-hours-plugin.php" instead of "working-hours.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 plugin1,848 lines of code in 29 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 21 | 514 | 367 | 1,395 |
PO File | 2 | 110 | 134 | 235 |
CSS | 3 | 32 | 0 | 179 |
JavaScript | 3 | 29 | 0 | 39 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 10.94 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 35.00 |
Average method complexity | 2.33 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 15 | |
▷ Abstract classes | 2 | 13.33% |
▷ Concrete classes | 13 | 86.67% |
▷ Final classes | 0 | 0.00% |
Methods | 127 | |
▷ Static methods | 2 | 1.57% |
▷ Public methods | 77 | 60.63% |
▷ Protected methods | 23 | 18.11% |
▷ Private methods | 27 | 21.26% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 7 | 100.00% |
▷ Public constants | 7 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.46MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 70.34KB | 25.42KB | ▼ 63.86% |
screenshot-3.png | 51.62KB | 17.87KB | ▼ 65.39% |
screenshot-6.png | 56.77KB | 18.01KB | ▼ 68.27% |
screenshot-2.png | 134.68KB | 48.24KB | ▼ 64.18% |
screenshot-4.png | 81.92KB | 26.93KB | ▼ 67.12% |