Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
- Install procedure had errors
- > Deprecated in wp-content/plugins/wp-open-hours/wp_openhour_widget.php+2
Methods with the same name as their class will not be constructors in a future version of PHP; WpOpenhourWidget has a deprecated constructor
Server metrics [RAM: ▼1.72MB] [CPU: ▼56.01ms] Passed 4 tests
This is a short check of server-side resources used by WP Open Hour Widget
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.28 ▼1.18 | 8.99 ▼34.72 |
Dashboard /wp-admin | 2.29 ▼1.05 | 11.48 ▼59.42 |
Posts /wp-admin/edit.php | 2.30 ▼1.06 | 13.27 ▼39.36 |
Add New Post /wp-admin/post-new.php | 2.30 ▼3.59 | 9.95 ▼90.53 |
Media Library /wp-admin/upload.php | 2.30 ▼0.93 | 10.47 ▼26.12 |
WP Openhour /wp-admin/options-general.php?page=wp-openhour | 2.30 | 11.79 |
Server storage [IO: ▲1.32MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 60 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_openhour |
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
widget_wpopenhourwidget |
can_compress_scripts |
wp_openhour_individual |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for WP Open Hour Widget
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,927 ▲166 | 13.86 ▼0.51 | 10.85 ▲8.86 | 42.36 ▼5.21 |
Dashboard /wp-admin | 2,228 ▲25 | 5.88 ▼0.02 | 96.02 ▼21.59 | 38.22 ▼7.01 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 1.98 ▼0.01 | 39.45 ▼1.55 | 35.74 ▼0.31 |
Add New Post /wp-admin/post-new.php | 1,553 ▼6 | 23.39 ▲4.99 | 680.28 ▲38.69 | 54.72 ▲2.30 |
Media Library /wp-admin/upload.php | 1,407 ▲4 | 4.20 ▼0.02 | 101.47 ▼0.43 | 45.23 ▼4.25 |
WP Openhour /wp-admin/options-general.php?page=wp-openhour | 1,003 | 2.02 | 29.01 | 30.74 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- The plugin did not uninstall gracefully
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in WpOpenhourWidget is deprecated since version 4.3.0! Use __construct() instead.
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_wpopenhourwidget
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=wp-openhour
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in WpOpenhourWidget is deprecated since version 4.3.0! Use __construct() instead.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-openhour
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
- > GET request to /wp-admin/options-general.php?page=wp-openhour
- > Notice in wp-content/plugins/wp-open-hours/openhour.php+58
Undefined index: wp_openhour_saved
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
Almost there! Just fix the following items
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/wp-open-hours/js/county2.js.php
- > /wp-content/plugins/wp-open-hours/time.php
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-open-hours/wp_openhour_widget.php:2
- > PHP Warning
date() expects at least 1 parameter, 0 given in wp-content/plugins/wp-open-hours/js/county2.js.php on line 153
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Plugin Name: You should set the name of your plugin on the first line (
=== wp-open-hours ===
) - Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
wp-open-hours/openhour.php 92% from 13 tests
The main file in "WP Open Hour Widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-open-hours.php" instead of "openhour.php")
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
Good job! No executable or dangerous file extensions detected2,690 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 1 | 65 | 37 | 1,205 |
SVG | 2 | 0 | 0 | 845 |
PHP | 4 | 69 | 53 | 400 |
JavaScript | 3 | 43 | 23 | 169 |
INI | 2 | 3 | 1 | 71 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 24.00 |
▷ Minimum class complexity | 24.00 |
▷ Maximum class complexity | 24.00 |
Average method complexity | 8.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 3 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 3 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
35 PNG files occupy 0.39MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/cafe-closed.png | 9.34KB | 4.53KB | ▼ 51.49% |
images/names.png | 107.04KB | 43.40KB | ▼ 59.46% |
images/fwoh_business_open_bg.png | 12.91KB | 5.50KB | ▼ 57.43% |
images/fwoh_social_icon_closed_door.png | 0.47KB | 0.50KB | 0.00% |
images/fwoh_social_icon_clock.png | 0.67KB | 0.62KB | ▼ 7.00% |