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
Installer ran successfully
Server metrics [RAM: ▲0.22MB] [CPU: ▼1.03ms] Passed 4 tests
Analyzing server-side resources used by Hotel Booking by Xfor
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.19 | 30.30 ▼10.46 |
Dashboard /wp-admin | 3.53 ▲0.23 | 58.61 ▲2.37 |
Posts /wp-admin/edit.php | 3.65 ▲0.29 | 57.10 ▲3.45 |
Add New Post /wp-admin/post-new.php | 6.13 ▲0.24 | 103.21 ▲5.02 |
Media Library /wp-admin/upload.php | 3.45 ▲0.22 | 37.33 ▲0.54 |
Server storage [IO: ▲1.20MB] [DB: ▲0.01MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 85 new files
Database: 5 new tables, 6 new options
New tables |
---|
wp_xfor_rooms |
wp_xfor_settings |
wp_xfor_room_types |
wp_xfor_orders |
wp_xfor_room_types_images |
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
Hotel Booking by Xfor: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,948 ▲202 | 15.13 ▲0.73 | 9.95 ▲8.28 | 45.03 ▲0.32 |
Dashboard /wp-admin | 2,273 ▲84 | 6.26 ▲1.31 | 133.97 ▲23.48 | 51.01 ▲5.44 |
Posts /wp-admin/edit.php | 2,159 ▲70 | 2.97 ▲0.98 | 49.24 ▲9.41 | 44.47 ▲7.98 |
Add New Post /wp-admin/post-new.php | 1,575 ▲61 | 23.98 ▲6.43 | 691.20 ▲36.99 | 46.48 ▼3.46 |
Media Library /wp-admin/upload.php | 1,452 ▲64 | 5.45 ▲1.20 | 106.44 ▲7.95 | 49.52 ▲8.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
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
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 output text when accessed directly:
- > /wp-content/plugins/hotel-booking-by-xfor/public/views/hotel_booking.php
- 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/hotel-booking-by-xfor/backend/views/home.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hotel-booking-by-xfor/backend/init.php:41
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hotel-booking-by-xfor/includes/ajax.php:119
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/hotel-booking-by-xfor/hotel-booking.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hotel-booking-by-xfor/public/init.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: reservation, booking, booking engine, room, hotel
hotel-booking-by-xfor/hotel-booking.php 92% from 13 tests
"Hotel Booking by Xfor" version 0.1.5'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: Please rename the main PHP file in this plugin to the plugin slug ("hotel-booking-by-xfor.php" instead of "hotel-booking.php")
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 plugin5,717 lines of code in 56 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 21 | 144 | 157 | 2,439 |
PHP | 11 | 381 | 121 | 1,364 |
CSS | 7 | 222 | 39 | 1,067 |
PO File | 2 | 345 | 356 | 734 |
SVG | 9 | 0 | 2 | 58 |
Markdown | 2 | 14 | 0 | 51 |
JSON | 4 | 0 | 0 | 4 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 10.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 25.00 |
Average method complexity | 3.55 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 11 | |
▷ Static methods | 11 | 100.00% |
▷ Public methods | 11 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 30 | |
▷ Named functions | 30 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 0.24MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshots/2.png | 29.13KB | 14.83KB | ▼ 49.11% |
assets/libs/dx/imgs_dhx_material/controls.png | 0.74KB | 0.70KB | ▼ 6.31% |
assets/screenshots/7.png | 36.05KB | 17.59KB | ▼ 51.20% |
assets/libs/dx/imgs_dhx_material/clock_big.png | 1.33KB | 0.86KB | ▼ 35.80% |
assets/libs/dx/imgs_dhx_material/export_pdf.png | 1.63KB | 0.43KB | ▼ 73.31% |