Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲1.22MB] [CPU: ▲1.69ms] 50% from 4 tests
A check of server-side resources used by HashBar - WordPress Notification Bar
Please fix the following
- RAM: You should keep total memory usage under 10MB (currently 10.79MB on /wp-admin/edit.php?post_type=wphash_ntf_bar&page=recommendations)
- CPU: Total CPU usage must kept under 500.00ms (currently 1,867.09ms on /wp-admin/edit.php?post_type=wphash_ntf_bar&page=recommendations)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.01 ▲1.50 | 57.79 ▲17.30 |
Dashboard /wp-admin | 4.56 ▲1.17 | 59.75 ▼7.58 |
Posts /wp-admin/edit.php | 4.61 ▲1.21 | 61.34 ▲10.66 |
Add New Post /wp-admin/post-new.php | 7.22 ▲1.29 | 99.30 ▼10.93 |
Media Library /wp-admin/upload.php | 4.48 ▲1.21 | 52.36 ▲14.59 |
Recommendations /wp-admin/edit.php?post_type=wphash_ntf_bar&page=recommendations | 10.79 | 1,867.09 |
Add New Notification /wp-admin/post-new.php?post_type=wphash_ntf_bar | 9.16 | 109.87 |
All Notifications /wp-admin/edit.php?post_type=wphash_ntf_bar | 6.91 | 68.21 |
Settings /wp-admin/edit.php?post_type=wphash_ntf_bar&page=hashbar_options_page | 6.84 | 58.07 |
Server storage [IO: ▲2.44MB] [DB: ▲0.70MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 194 new files
Database: 1 new table, 9 new options
New tables |
---|
wp_hthb_analytics |
New WordPress options |
---|
hashbar_1st_upgrade_completed |
widget_theysaidso_widget |
db_upgraded |
hthb_analyticstbl_exist |
theysaidso_admin_options |
hashbar_143 |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for HashBar - WordPress Notification Bar
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,121 ▲375 | 13.42 ▼0.81 | 12.90 ▲10.96 | 43.22 ▼1.35 |
Dashboard /wp-admin | 2,304 ▲130 | 5.64 ▼0.03 | 89.57 ▼3.07 | 40.40 ▲3.28 |
Posts /wp-admin/edit.php | 2,203 ▲103 | 2.00 ▲0.02 | 39.96 ▲4.65 | 35.66 ▼2.48 |
Add New Post /wp-admin/post-new.php | 1,626 ▲91 | 23.05 ▲4.68 | 656.56 ▲21.55 | 63.84 ▼7.84 |
Media Library /wp-admin/upload.php | 1,509 ▲106 | 4.20 ▲0.10 | 95.15 ▼9.73 | 43.81 ▼0.82 |
Recommendations /wp-admin/edit.php?post_type=wphash_ntf_bar&page=recommendations | 3,210 | 4.13 | 69.48 | 112.28 |
Add New Notification /wp-admin/post-new.php?post_type=wphash_ntf_bar | 8,275 | 20.94 | 945.55 | 70.03 |
All Notifications /wp-admin/edit.php?post_type=wphash_ntf_bar | 1,415 | 4.14 | 66.48 | 28.57 |
Settings /wp-admin/edit.php?post_type=wphash_ntf_bar&page=hashbar_options_page | 1,258 | 3.85 | 47.80 | 25.82 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.69MB] 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
- The uninstall procedure has failed, leaving 8 options in the database
- hashbar_143
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- hashbar_1st_upgrade_completed
- widget_recent-comments
- widget_theysaidso_widget
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 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 6× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/hashbar-wp-notification-bar/init.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function Hashbarfree\\Analytics\\add_action() in wp-content/plugins/hashbar-wp-notification-bar/inc/analytical-store.php:30
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hashbar-wp-notification-bar/inc/custom-posts.php:58
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hashbar-wp-notification-bar/inc/metabox.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hashbar-wp-notification-bar/admin/plugin-options.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hashbar-wp-notification-bar/inc/shortcode.php:4
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
- > GET request to /wp-admin/post-new.php?post_type=wphash_ntf_bar
- > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:22180
Block validation: Expected attribute `%s` of value `%s`, saw `%s`." "style" "width:250px;background-color:#FB3555;background-image:url(undefined);background-position:center;background-repeat:no-repeat;background-size:cover;border-radius:6px" "background-color:#FB3555;background-image:url(undefined);background-position:center;background-repeat:no-repeat;background-size:cover;border-radius:6px
- > GET request to /wp-admin/post-new.php?post_type=wphash_ntf_bar
- > Console-api (severe) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:22180
Block validation: Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s" "hashbar/hashbar-promo-banner" Object "\u003Cdiv class=\"wp-block-hashbar-hashbar-promo-banner ht-promo-banner\" style=\"width:250px;background-color:#FB3555;background-image:url(undefined);background-position:center;background-repeat:no-repeat;background-size:cover;border-radius:6px\">\u003Cdiv class=\"ht-content\">\u003Ch4 class=\"promo-title\" style=\"font-size:22px;color:#fff\">Add Promo Title\u003C/h4>\u003Cp class=\"promo-summery\" style=\"font-size:17px;color:#fff\">Add Promo Content\u003C/p>\u003C/div>\u003Cdiv class=\"ht-promo-button\">\u003Ca href=\"#\" style=\"background-color:#fff;color:#1D1E22\">Button\u003C/a>\u003C/div>\u003C/div>" "\u003Cdiv class=\"wp-block-hashbar-hashbar-promo-banner ht-promo-banner\" style=\"background-color:#FB3555;background-image:url(undefined);background-position:center;background-repeat:no-repeat;background-size:cover;border-radius:6px\">\u003Cdiv class=\"ht-content\">\u003Ch4 class=\"promo-title\" style=\"font-size:22px;color:#fff\">Add Promo Title\u003C/h4>\u003Cp class=\"promo-summery\" style=\"font-size:17px;color:#fff\">Add Promo Content\u003C/p>\u003C/div>\u003Cdiv class=\"ht-promo-button\">\u003Ca href=\"#\" style=\"background-color:#fff;color:#1D1E22\">Button\u003C/a>\u003C/div>\u003C/div>
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: wordpress notification bar, notification bar, notification, offer bar, promotion bar
hashbar-wp-notification-bar/init.php 85% from 13 tests
Analyzing the main PHP file in "HashBar - WordPress Notification Bar" version 1.4.3
The following require your attention:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("hashbar-wp-notification-bar.php" instead of "init.php")
- 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
Good job! No executable or dangerous file extensions detected26,578 lines of code in 152 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 95 | 3,044 | 1,258 | 10,494 |
CSS | 12 | 448 | 522 | 5,579 |
Sass | 15 | 928 | 3 | 4,730 |
JavaScript | 17 | 1,408 | 522 | 4,622 |
SVG | 8 | 0 | 0 | 794 |
JSON | 4 | 2 | 0 | 354 |
XML | 1 | 0 | 0 | 5 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 23.23 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 139.00 |
Average method complexity | 6.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 52.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 69 | |
▷ Abstract classes | 2 | 2.90% |
▷ Concrete classes | 67 | 97.10% |
▷ Final classes | 0 | 0.00% |
Methods | 294 | |
▷ Static methods | 53 | 18.03% |
▷ Public methods | 290 | 98.64% |
▷ Protected methods | 1 | 0.34% |
▷ Private methods | 3 | 1.02% |
Functions | 67 | |
▷ Named functions | 65 | 97.01% |
▷ Anonymous functions | 2 | 2.99% |
Constants | 9 | |
▷ Global constants | 9 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
34 PNG files occupy 0.23MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/click-icons-bg.png | 1.29KB | 1.31KB | 0.00% |
admin/img/views-icons-bg.png | 1.20KB | 1.23KB | 0.00% |
admin/img/hashbar-1.png | 5.62KB | 5.83KB | 0.00% |
inc/recomendation/assets/images/extensions/ht-slider-addons-pro.png | 6.41KB | 4.35KB | ▼ 32.23% |
(invalid) inc/recomendation/assets/images/extensions/was-this-helpful.png | 1.21KB | 0.00KB | ▼ 100.00% |