Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.01MB] [CPU: ▲1,236.67ms] 75% from 4 tests
Analyzing server-side resources used by iGMS Direct Booking
It is recommended to improve the following
- Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 1,236.67ms on /wp-admin/upload.php)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.63 ▲0.17 | 40.46 ▲0.40 |
Dashboard /wp-admin | 3.34 ▲0.04 | 1,659.34 ▲1,610.82 |
Posts /wp-admin/edit.php | 3.45 ▲0.10 | 1,718.23 ▲1,669.70 |
Add New Post /wp-admin/post-new.php | 5.61 ▼0.28 | 1,780.51 ▲1,680.91 |
Media Library /wp-admin/upload.php | 3.35 ▲0.12 | 1,699.87 ▲1,665.77 |
Server storage [IO: ▲1.02MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 15 new options
New WordPress options |
---|
widget_recent-posts |
direct_booking_widget_uuid |
direct_booking_widget_profile_name |
can_compress_scripts |
widget_theysaidso_widget |
direct_booking_reservation_widget_book_now_button_text |
direct_booking_reservation_widget_check_availability_button_text |
widget_idbw_direct_booking_reservation_widget |
direct_booking_widget_profile_email |
direct_booking_widget_color |
... |
Browser metrics Passed 4 tests
Checking browser requirements for iGMS Direct Booking
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,864 ▲93 | 13.66 ▼0.72 | 2.07 ▲0.10 | 40.32 ▼4.72 |
Dashboard /wp-admin | 2,228 ▲37 | 5.86 ▼0.04 | 95.60 ▼10.55 | 66.85 ▲20.74 |
Posts /wp-admin/edit.php | 2,126 ▲34 | 2.02 ▼0.02 | 35.49 ▼4.70 | 31.41 ▼7.19 |
Add New Post /wp-admin/post-new.php | 6,272 ▲4,739 | 19.67 ▼3.77 | 936.65 ▲263.39 | 36.01 ▼32.96 |
Media Library /wp-admin/upload.php | 1,422 ▲34 | 4.24 ▲0.10 | 93.35 ▼7.30 | 100.39 ▲57.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- This plugin does not fully uninstall, leaving 15 options in the database
- widget_recent-posts
- direct_booking_widget_uuid
- direct_booking_widget_profile_name
- db_upgraded
- widget_idbw_direct_booking_reservation_widget
- widget_theysaidso_widget
- direct_booking_widget_user_uid
- direct_booking_reservation_widget_book_now_button_text
- direct_booking_reservation_widget_check_availability_button_text
- 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)
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
The following issues need your attention
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/igms-direct-booking/view/reservation-widget-form.php
- 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/igms-direct-booking/includes/register-activation-hook.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/igms-direct-booking/includes/register-uninstall-hook.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/igms-direct-booking/view/direct-booking-settings-page.php:3
- > PHP Fatal error
Uncaught Error: Class 'IDBW_DataTransferObject' not found in wp-content/plugins/igms-direct-booking/dataTransferObjects/IDBW_PropertyDTO.php:9
- > PHP Fatal error
require_once(): Failed opening required 'IGMS_DIRECT_BOOKING_WIDGET_ROOT/view/direct-booking-settings-page.php' (include_path='.:/usr/share/php') in wp-content/plugins/igms-direct-booking/settings/IDBW_Settings.php on line 3
- > PHP Warning
Use of undefined constant IGMS_DIRECT_BOOKING_WIDGET_ROOT - assumed 'IGMS_DIRECT_BOOKING_WIDGET_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/igms-direct-booking/settings/IDBW_Settings.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/igms-direct-booking/includes/register-direct-booking-reservation-widget.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/igms-direct-booking/includes/register-reservation-widget-block.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/igms-direct-booking/view/direct-booking-settings-page.php:3
- > PHP Warning
require_once(IGMS_DIRECT_BOOKING_WIDGET_ROOT/view/direct-booking-settings-page.php): failed to open stream: No such file or directory in wp-content/plugins/igms-direct-booking/settings/IDBW_Settings.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: reservations, airbnb, reservation widget, direct booking, booking...
igms-direct-booking/igms-direct-booking.php 85% from 13 tests
The main file in "iGMS Direct Booking" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "5.6 @todo define wordpress version")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
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 detected1,264 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 19 | 211 | 282 | 1,259 |
SVG | 1 | 0 | 0 | 3 |
JavaScript | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
Average class complexity | 2.90 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 1.37 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 1 | 10.00% |
▷ Concrete classes | 9 | 90.00% |
▷ Final classes | 0 | 0.00% |
Methods | 53 | |
▷ Static methods | 34 | 64.15% |
▷ Public methods | 52 | 98.11% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.89% |
Functions | 9 | |
▷ Named functions | 7 | 77.78% |
▷ Anonymous functions | 2 | 22.22% |
Constants | 31 | |
▷ Global constants | 2 | 6.45% |
▷ Class constants | 29 | 93.55% |
▷ Public constants | 29 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.93MB with 0.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-3.png | 182.99KB | 73.67KB | ▼ 59.74% |
assets/screenshot-2.png | 170.00KB | 72.36KB | ▼ 57.43% |
assets/screenshot-4.png | 186.54KB | 73.49KB | ▼ 60.60% |
assets/screenshot-1.png | 244.14KB | 87.69KB | ▼ 64.08% |
assets/screenshot-5.png | 165.34KB | 66.52KB | ▼ 59.77% |