Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼2.51ms] Passed 4 tests
Analyzing server-side resources used by Tourfic – Ultimate Hotel Booking & Travel Booking WordPress Plugin | WooCommerce Booking
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 35.59 ▼5.22 |
Dashboard /wp-admin | 3.37 ▲0.06 | 45.16 ▼2.69 |
Posts /wp-admin/edit.php | 3.48 ▲0.12 | 48.43 ▼1.01 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 90.41 ▼1.12 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 34.44 ▲1.44 |
Server storage [IO: ▲13.34MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 285 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Tourfic – Ultimate Hotel Booking & Travel Booking WordPress Plugin | WooCommerce Booking
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲42 | 14.27 ▲0.04 | 1.52 ▼0.17 | 37.71 ▼5.50 |
Dashboard /wp-admin | 2,206 ▲32 | 5.53 ▼0.01 | 90.53 ▼14.01 | 45.83 ▲0.86 |
Posts /wp-admin/edit.php | 2,118 ▲15 | 2.03 ▲0.08 | 39.57 ▼3.50 | 38.07 ▲0.25 |
Add New Post /wp-admin/post-new.php | 1,540 ▲14 | 23.25 ▼0.40 | 614.35 ▼31.90 | 64.02 ▲6.46 |
Media Library /wp-admin/upload.php | 1,414 ▲14 | 4.19 ▼0.03 | 94.65 ▼5.64 | 45.92 ▼0.58 |
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
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
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
- 6× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/tourfic/templates/template-parts/tour/design-1/map.php
- > /wp-content/plugins/tourfic/templates/template-parts/tour/design-1/information.php
- > /wp-content/plugins/tourfic/templates/template-parts/hotel/design-1/rooms.php
- > /wp-content/plugins/tourfic/templates/template-parts/tour/design-1/itinerary.php
- > /wp-content/plugins/tourfic/templates/template-parts/tour/design-1/include-exclude.php
- > /wp-content/plugins/tourfic/templates/template-parts/tour/design-1/price.php
- 73× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: tc in wp-content/plugins/tourfic/templates/template-parts/hotel/design-1/trams-condition.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/tourfic/inc/booking-details/tour/booking-details.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tourfic/inc/functions/functions_duplicator.php:20
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tourfic/templates/common/tf-wishlist.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tourfic/templates/apartment/single-apartment.php:6
- > PHP Notice
Undefined variable: highlights in wp-content/plugins/tourfic/templates/template-parts/tour/design-1/highlights.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tourfic/inc/functions/functions-fonts.php:1565
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tourfic/inc/functions/shortcodes.php:66
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tourfic/templates/common/search-results.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/tourfic/inc/booking-details/hotel/single-booking-details.php:4
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Tags: You are using too many tags: 21 tag instead of maximum 10
- Screenshots: Add images for these screenshots: #18 (Dashboard Booking Data), #19 (Enquiry Form Data), #20 (Our Support Channels)
tourfic/tourfic.php 92% from 13 tests
The primary PHP file in "Tourfic – Ultimate Hotel Booking & Travel Booking WordPress Plugin | WooCommerce Booking" version 2.10.10 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 207 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected76,078 lines of code in 200 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 153 | 5,219 | 5,462 | 52,025 |
CSS | 10 | 592 | 67 | 13,627 |
SVG | 13 | 1 | 0 | 9,590 |
Sass | 3 | 30 | 26 | 421 |
JavaScript | 20 | 61 | 241 | 370 |
JSON | 1 | 0 | 0 | 45 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
These items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 139)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.69 |
Average class complexity | 30.72 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 385.00 |
Average method complexity | 4.66 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 139.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 71 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 71 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 413 | |
▷ Static methods | 15 | 3.63% |
▷ Public methods | 342 | 82.81% |
▷ Protected methods | 33 | 7.99% |
▷ Private methods | 38 | 9.20% |
Functions | 379 | |
▷ Named functions | 266 | 70.18% |
▷ Anonymous functions | 113 | 29.82% |
Constants | 21 | |
▷ Global constants | 18 | 85.71% |
▷ Class constants | 3 | 14.29% |
▷ Public constants | 3 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
40 PNG files occupy 1.44MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/app/images/tourfic-logo-white.png | 17.95KB | 10.19KB | ▼ 43.23% |
assets/app/images/ticket-banner.png | 32.44KB | 11.06KB | ▼ 65.91% |
assets/app/images/pdf-downoader.png | 28.32KB | 9.26KB | ▼ 67.31% |
assets/app/images/globe.png | 1.08KB | 0.57KB | ▼ 47.61% |
assets/app/images/video.png | 1.02KB | 0.60KB | ▼ 41.17% |