Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼2.52ms] Passed 4 tests
A check of server-side resources used by Hostel
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 42.24 ▼18.44 |
Dashboard /wp-admin | 3.33 ▲0.03 | 45.77 ▲0.11 |
Posts /wp-admin/edit.php | 3.38 ▲0.03 | 52.08 ▲1.60 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.05 | 98.40 ▲7.15 |
Media Library /wp-admin/upload.php | 3.25 ▲0.03 | 40.18 ▲6.64 |
Unavailable Dates /wp-admin/admin.php?page=wphostel_unavailable | 3.27 | 36.07 |
Manage Bookings /wp-admin/admin.php?page=wphostel_bookings | 3.19 | 33.87 |
Manage Rooms /wp-admin/admin.php?page=wphostel_rooms | 3.27 | 33.96 |
Email Log /wp-admin/admin.php?page=wphostel_emaillog | 3.27 | 34.34 |
Help /wp-admin/admin.php?page=wphostel_help | 3.27 | 32.70 |
Settings /wp-admin/admin.php?page=wphostel_options | 3.32 | 35.12 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 35 new files
Database: 4 new tables, 10 new options
New tables |
---|
wp_wphostel_payments |
wp_wphostel_emaillog |
wp_wphostel_bookings |
wp_wphostel_rooms |
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
wphostel_datepicker_css |
wphostel_max_date |
can_compress_scripts |
wphostel_version |
wphostel_currency |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Hostel
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,944 ▲187 | 13.74 ▼0.86 | 8.96 ▲6.11 | 42.07 ▼14.01 |
Dashboard /wp-admin | 2,260 ▲72 | 4.92 ▲0.06 | 100.09 ▼9.83 | 41.09 ▼1.35 |
Posts /wp-admin/edit.php | 2,143 ▲54 | 2.06 ▲0.01 | 38.36 ▲2.34 | 37.16 ▲2.31 |
Add New Post /wp-admin/post-new.php | 1,568 ▲48 | 18.68 ▼4.49 | 646.81 ▼60.60 | 59.74 ▼13.02 |
Media Library /wp-admin/upload.php | 1,442 ▲57 | 4.24 ▲0.11 | 100.36 ▲1.76 | 41.73 ▲0.66 |
Unavailable Dates /wp-admin/admin.php?page=wphostel_unavailable | 1,410 | 2.28 | 40.56 | 26.48 |
Manage Bookings /wp-admin/admin.php?page=wphostel_bookings | 861 | 1.87 | 27.47 | 25.71 |
Manage Rooms /wp-admin/admin.php?page=wphostel_rooms | 814 | 1.86 | 24.08 | 24.81 |
Email Log /wp-admin/admin.php?page=wphostel_emaillog | 1,005 | 2.07 | 27.84 | 27.42 |
Help /wp-admin/admin.php?page=wphostel_help | 1,049 | 1.89 | 23.43 | 31.26 |
Settings /wp-admin/admin.php?page=wphostel_options | 2,386 | 7.97 | 157.35 | 49.81 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- The plugin did not uninstall successfully, leaving 4 tables in the database
- wp_wphostel_rooms
- wp_wphostel_emaillog
- wp_wphostel_payments
- wp_wphostel_bookings
- Zombie WordPress options detected upon uninstall: 10 options
- theysaidso_admin_options
- widget_recent-comments
- wphostel_currency
- wphostel_max_date
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- wphostel_version
- wphostel_datepicker_css
- widget_theysaidso_widget
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
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=wphostel_bookings
- > Notice in wp-content/plugins/hostel/controllers/bookings.php+7
Undefined index: do
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wphostel_options
- > Notice in wp-content/plugins/hostel/views/options.php+77
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
The following issues need your attention
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/hostel/views/ical.html.php
- 18× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: shortcode_id in wp-content/plugins/hostel/views/booking-form.html.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/hostel/views/sidebar.html.php:21
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/hostel/views/ical.html.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/hostel/views/help.html.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/hostel/views/pay-paypal.html.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/hostel/views/options.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/hostel/views/room.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/hostel/views/booking-form.html.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function wphostel_resp_table_css() in wp-content/plugins/hostel/views/bookings.html.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/hostel/views/list-rooms.html.php:2
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
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
8 plugin tags: booking, hostel, hotel, touch, bnb...
hostel/hostel.php 92% from 13 tests
"Hostel" version 1.1.5.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
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
There were no executable files found in this plugin2,898 lines of code in 31 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 28 | 435 | 235 | 2,083 |
PO File | 1 | 231 | 234 | 712 |
JavaScript | 1 | 13 | 9 | 74 |
CSS | 1 | 8 | 0 | 29 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 27.78 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 60.00 |
Average method complexity | 6.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 46 | |
▷ Static methods | 30 | 65.22% |
▷ Public methods | 46 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 16 | |
▷ Named functions | 16 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 11 | |
▷ Global constants | 11 | 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
PNG images were not found in this plugin