Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
- The plugin did not install without errors
- > Warning in wp-content/plugins/leadsquared-website-topbar/index.php+155
Use of undefined constant leadsquared_home_page - assumed 'leadsquared_home_page' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▼1.91MB] [CPU: ▼56.08ms] Passed 4 tests
An overview of server-side resources used by LeadSquared Website Topbar
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.08 ▼1.38 | 4.27 ▼38.13 |
Dashboard /wp-admin | 2.10 ▼1.21 | 5.57 ▼46.76 |
Posts /wp-admin/edit.php | 2.10 ▼1.26 | 6.20 ▼45.11 |
Add New Post /wp-admin/post-new.php | 2.10 ▼3.79 | 7.45 ▼94.30 |
Media Library /wp-admin/upload.php | 2.10 ▼1.13 | 5.47 ▼27.52 |
/wp-admin/admin.php?page=leadsquared | 2.10 | 6.35 |
Website Topbar /wp-admin/admin.php?page=top_nav_html_page_slug | 2.10 | 7.47 |
Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
leadsquared_all_fields |
Browser metrics Passed 4 tests
LeadSquared Website Topbar: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,938 ▲203 | 14.43 ▲0.05 | 6.39 ▲4.62 | 40.69 ▼4.78 |
Dashboard /wp-admin | 2,259 ▲70 | 5.88 ▲0.87 | 116.50 ▼10.02 | 81.06 ▲35.88 |
Posts /wp-admin/edit.php | 2,145 ▲53 | 2.82 ▲0.83 | 44.57 ▲6.74 | 35.64 ▲4.45 |
Add New Post /wp-admin/post-new.php | 1,555 ▲41 | 23.68 ▲6.24 | 692.20 ▲3.63 | 40.50 ▼15.19 |
Media Library /wp-admin/upload.php | 1,432 ▲41 | 5.08 ▲0.85 | 105.33 ▼1.38 | 82.07 ▲34.67 |
/wp-admin/admin.php?page=leadsquared | 859 | 2.16 | 35.75 | 31.96 |
Website Topbar /wp-admin/admin.php?page=top_nav_html_page_slug | 1,673 | 2.34 | 37.48 | 48.76 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin cannot be uninstalled
- > User notice in wp-includes/functions.php+5905
Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the LeadSquared-home-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=top_nav_html_page_slug
- > User notice in wp-includes/functions.php+5905
Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the LeadSquared-home-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=top_nav_html_page_slug
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the LeadSquared-home-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=top_nav_html_page_slug
- > Warning in wp-content/plugins/leadsquared-website-topbar/index.php+155
Use of undefined constant leadsquared_home_page - assumed 'leadsquared_home_page' (this will throw an Error in a future version of PHP)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=top_nav_html_page_slug
- > Notice in wp-content/plugins/leadsquared-website-topbar/index.php+139
Undefined variable: menuExist
- > GET request to /wp-admin/admin.php?page=top_nav_html_page_slug
- > Notice in wp-content/plugins/leadsquared-website-topbar/inc/top_nav_bar_admin_page_sttings.php+2
Constant LS_PLUGIN_URL already defined
- 17 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=top_nav_html_page_slug
- > Notice in wp-content/plugins/leadsquared-website-topbar/inc/top_nav_bar_admin_page_sttings.php+50
Trying to access array offset on value of type null
- > GET request to /wp-admin/admin.php?page=top_nav_html_page_slug
- > Notice in wp-content/plugins/leadsquared-website-topbar/inc/top_nav_bar_admin_page_sttings.php+60
Undefined variable: message
SRP 50% 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
- 5× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/leadsquared-website-topbar/index.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/leadsquared-website-topbar/inc/leadsquared-admin.php:5
- > PHP Warning
Use of undefined constant LS_PLUGIN_URL - assumed 'LS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/leadsquared-website-topbar/inc/leadsquared-admin.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/leadsquared-website-topbar/inc/top_nav_bar_admin_page_sttings.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/leadsquared-website-topbar/inc/page_html.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: top bar, header bar, lead bar, cta, notification bar...
leadsquared-website-topbar/index.php 85% from 13 tests
The main PHP file in "LeadSquared Website Topbar" ver. 1.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 289 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("leadsquared-website-topbar.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,530 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 6 | 407 | 367 | 2,763 |
PHP | 5 | 75 | 18 | 456 |
CSS | 4 | 41 | 0 | 302 |
HTML | 1 | 3 | 0 | 9 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.88 |
Average class complexity | 1.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 3 | |
▷ Static methods | 3 | 100.00% |
▷ Public methods | 3 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
17 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/images/ui-bg_highlight-soft_15_cc0000_1x100.png | 0.31KB | 0.18KB | ▼ 43.48% |
css/images/ui-bg_flat_65_ffffff_40x100.png | 0.20KB | 0.08KB | ▼ 58.17% |
css/images/ui-bg_glass_55_fbf8ee_1x400.png | 0.33KB | 0.13KB | ▼ 60.29% |
images/powered_byLS.png | 4.55KB | 2.32KB | ▼ 49.02% |
css/images/ui-bg_highlight-hard_100_eeeeee_1x100.png | 0.25KB | 0.14KB | ▼ 43.65% |