Benchmarks
Plugin footprint 82% 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: ▲5.00MB] [CPU: ▼114.49ms] 75% from 4 tests
A check of server-side resources used by Flight Search Widget and Blocks
Please fix the following
- Extra RAM: Extra memory usage must be kept under 5MB (currently 5.00MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 7.87 ▲5.15 | 57.48 ▲33.69 |
Dashboard /wp-admin | 8.18 ▲5.12 | 80.54 ▲30.33 |
Posts /wp-admin/edit.php | 8.23 ▲5.12 | 70.74 ▲37.05 |
Add New Post /wp-admin/post-new.php | 10.08 ▲4.65 | 96.56 ▼551.63 |
Media Library /wp-admin/upload.php | 8.12 ▲5.11 | 66.76 ▲29.67 |
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius | 8.29 | 55.31 |
Server storage [IO: ▲6.10MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 395 new files
Database: no new tables, 6 new options
New WordPress options |
---|
fs_gdpr |
fs_accounts |
fs_debug_mode |
fs_api_cache |
widget_fswb_simple |
fs_active_plugins |
Browser metrics Passed 4 tests
Checking browser requirements for Flight Search Widget and Blocks
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,795 ▲199 | 16.07 ▲0.43 | 11.60 ▼0.10 | 45.91 ▼12.50 |
Dashboard /wp-admin | 3,031 ▲100 | 6.19 ▲0.21 | 139.54 ▲2.51 | 120.92 ▲4.53 |
Posts /wp-admin/edit.php | 2,802 ▲66 | 2.75 ▲0.03 | 65.56 ▲4.41 | 99.51 ▲0.56 |
Add New Post /wp-admin/post-new.php | 3,516 ▲2,016 | 14.66 ▼3.86 | 438.32 ▲83.20 | 125.91 ▲9.35 |
Media Library /wp-admin/upload.php | 1,794 ▼10 | 5.43 ▲0.40 | 148.54 ▲5.94 | 134.95 ▲8.58 |
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius | 1,516 | 2.47 | 57.55 | 83.24 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- fs_debug_mode
- widget_fswb_simple
- fs_accounts
- fs_gdpr
- fs_api_cache
- fs_active_plugins
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/flight-search-widget-blocks/freemius/templates/ajax-loader.php
- 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flight-search-widget-blocks/include/fswb-blocks.php:139
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/flight-search-widget-blocks/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/flight-search-widget-blocks/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/flight-search-widget-blocks/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/flight-search-widget-blocks/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/flight-search-widget-blocks/include/fswb-categories.php:21
- > PHP Fatal error
Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/flight-search-widget-blocks/freemius/templates/account/partials/addon.php:9
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/flight-search-widget-blocks/freemius/templates/account/partials/addon.php on line 7
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/flight-search-widget-blocks/freemius/templates/account/partials/addon.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function freemius() in wp-content/plugins/flight-search-widget-blocks/freemius/templates/partials/network-activation.php:6
- > 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 on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: skyscanner, flight search, gutenberg, widget, flight
flight-search-widget-blocks/flight-search-widget-blocks.php 92% from 13 tests
The main file in "Flight Search Widget and Blocks" v. 1.1.0 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:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin58,524 lines of code in 330 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 164 | 8,070 | 17,631 | 37,526 |
PO File | 21 | 5,946 | 7,400 | 13,048 |
JavaScript | 95 | 384 | 718 | 3,601 |
Sass | 28 | 399 | 77 | 2,515 |
CSS | 17 | 97 | 90 | 1,085 |
Markdown | 2 | 138 | 0 | 556 |
SVG | 2 | 0 | 1 | 165 |
JSON | 1 | 0 | 0 | 28 |
PHP code 0% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Class cyclomatic complexity should be reduced to less than 1000 (currently 2,360)
- Please reduce cyclomatic complexity of methods to less than 100 (currently 104)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.56 |
Average class complexity | 42.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,360.00 |
Average method complexity | 4.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 104.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 121 | |
▷ Abstract classes | 2 | 1.65% |
▷ Concrete classes | 119 | 98.35% |
▷ Final classes | 0 | 0.00% |
Methods | 1,564 | |
▷ Static methods | 183 | 11.70% |
▷ Public methods | 1,054 | 67.39% |
▷ Protected methods | 203 | 12.98% |
▷ Private methods | 307 | 19.63% |
Functions | 129 | |
▷ Named functions | 127 | 98.45% |
▷ Anonymous functions | 2 | 1.55% |
Constants | 133 | |
▷ Global constants | 106 | 79.70% |
▷ Class constants | 27 | 20.30% |
▷ Public constants | 27 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
assets/images/fswp-logo-rectangle.png | 20.78KB | 7.07KB | ▼ 65.97% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |