Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/availability/index.php+11
Methods with the same name as their class will not be constructors in a future version of PHP; Availability has a deprecated constructor
Server metrics [RAM: ▼1.83MB] [CPU: ▼64.83ms] Passed 4 tests
This is a short check of server-side resources used by Availability Calendar
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.16 ▼1.31 | 5.08 ▼37.51 |
Dashboard /wp-admin | 2.18 ▼1.13 | 7.73 ▼50.01 |
Posts /wp-admin/edit.php | 2.18 ▼1.18 | 6.47 ▼55.53 |
Add New Post /wp-admin/post-new.php | 2.18 ▼3.71 | 6.51 ▼116.28 |
Media Library /wp-admin/upload.php | 2.18 ▼1.05 | 6.27 ▼33.30 |
Availability /wp-admin/edit.php?post_type=page&page=availability | 2.18 | 6.75 |
Availability /wp-admin/plugins.php?page=availability | 2.28 | 5.97 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_availability |
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
availability |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Availability Calendar
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,799 ▲38 | 14.25 ▼0.41 | 1.92 ▲0.14 | 42.49 ▼0.07 |
Dashboard /wp-admin | 2,206 ▲29 | 5.58 ▼0.09 | 94.94 ▼9.70 | 40.16 ▼4.85 |
Posts /wp-admin/edit.php | 2,105 ▲2 | 2.11 ▲0.08 | 40.12 ▼1.15 | 38.80 ▲3.23 |
Add New Post /wp-admin/post-new.php | 1,537 ▲2 | 23.27 ▲5.01 | 691.25 ▲24.07 | 53.51 ▼20.89 |
Media Library /wp-admin/upload.php | 1,411 ▲11 | 4.20 ▼0.01 | 101.49 ▼4.33 | 47.00 ▲2.33 |
Availability /wp-admin/edit.php?post_type=page&page=availability | 2,989 | 1.66 | 28.66 | 33.71 |
Availability /wp-admin/plugins.php?page=availability | 955 | 2.01 | 26.80 | 30.66 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/availability/index.php+11
Methods with the same name as their class will not be constructors in a future version of PHP; Availability has a deprecated constructor
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/plugins.php?page=availability
- > Deprecated in wp-content/plugins/availability/index.php+11
Methods with the same name as their class will not be constructors in a future version of PHP; Availability has a deprecated constructor
- > GET request to /wp-admin/edit.php?post_type=page&page=availability
- > Notice in wp-content/plugins/availability/index.php+182
Trying to access array offset on value of type bool
- 2 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=page&page=availability
- > User deprecated in wp-includes/functions.php+5453
Function wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/plugins.php?page=availability
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/plugins.php?page=availability
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
- 6× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/availability/index.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/availability/settings.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/availability/manage.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/availability/calendar.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/availability/dropdown.php:3
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/availability/index.php on line 21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Screenshots: These screenshots require images: #1 (The availability calendar management page.), #2 (Availability calendar with default styles.), #3 (Example showing the addition of shortcodes to a page.), #4 (Multi-calendar management and plugin settings.)
availability/index.php 92% from 13 tests
The main PHP script in "Availability Calendar" version 0.2.4 is automatically included on every request by WordPress
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("availability.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin697 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 3 | 21 | 653 |
CSS | 1 | 0 | 0 | 44 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.46 |
Average class complexity | 73.00 |
▷ Minimum class complexity | 73.00 |
▷ Maximum class complexity | 73.00 |
Average method complexity | 7.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 20.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 | 12 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 12 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
4 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 12.86KB | 7.73KB | ▼ 39.85% |
screenshot-3.png | 29.44KB | 13.74KB | ▼ 53.34% |
screenshot-1.png | 27.01KB | 12.25KB | ▼ 54.66% |
screenshot-4.png | 28.26KB | 12.96KB | ▼ 54.16% |