Benchmarks
Plugin footprint 64% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲5.14MB] [CPU: ▲29.22ms] 50% from 4 tests
A check of server-side resources used by Better Sharing
Please take the time to fix the following items
- CPU: Total CPU usage should be kept under 500.00ms (currently 1,678.06ms on /wp-admin/admin.php?page=better-sharing-general)
- Extra RAM: The extra memory usage should kept under 5MB (currently 5.14MB on /wp-admin/admin.php?page=better-sharing-general)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.89 ▲5.42 | 69.10 ▲33.68 |
Dashboard /wp-admin | 8.91 ▲5.60 | 80.88 ▲35.65 |
Posts /wp-admin/edit.php | 8.91 ▲5.55 | 88.08 ▲40.24 |
Add New Post /wp-admin/post-new.php | 9.86 ▲3.97 | 103.64 ▲7.29 |
Media Library /wp-admin/upload.php | 8.91 ▲5.68 | 74.87 ▲43.34 |
Settings /wp-admin/admin.php?page=bswp-plugin-settings | 8.91 | 67.74 |
Integrations /wp-admin/admin.php?page=better-sharing-addons | 8.91 | 67.88 |
Email Templates /wp-admin/edit.php?post_type=bswp_email_template | 8.91 | 67.71 |
UI Templates /wp-admin/edit.php?post_type=bswp_ui_template | 8.91 | 68.28 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 8.91 | 63.17 |
Get Started /wp-admin/admin.php?page=better-sharing-general | 8.91 | 1,678.06 |
Server storage [IO: ▲3.67MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 258 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
fs_active_plugins |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
fs_debug_mode |
fs_accounts |
Browser metrics Passed 4 tests
An overview of browser requirements for Better Sharing
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,213 ▲451 | 24.63 ▲10.35 | 45.63 ▲43.85 | 32.48 ▼10.75 |
Dashboard /wp-admin | 2,408 ▲231 | 10.97 ▲5.31 | 135.63 ▲37.24 | 47.67 ▲3.86 |
Posts /wp-admin/edit.php | 2,317 ▲214 | 9.82 ▲7.79 | 93.21 ▲51.94 | 45.32 ▲12.10 |
Add New Post /wp-admin/post-new.php | 1,540 ▲14 | 21.59 ▼1.72 | 555.86 ▼69.64 | 38.60 ▼10.90 |
Media Library /wp-admin/upload.php | 1,634 ▲234 | 12.49 ▲8.30 | 135.50 ▲28.39 | 44.62 ▲1.60 |
Settings /wp-admin/admin.php?page=bswp-plugin-settings | 1,214 | 9.47 | 85.27 | 35.35 |
Integrations /wp-admin/admin.php?page=better-sharing-addons | 1,092 | 9.51 | 78.23 | 34.24 |
Email Templates /wp-admin/edit.php?post_type=bswp_email_template | 1,319 | 9.73 | 85.62 | 35.15 |
UI Templates /wp-admin/edit.php?post_type=bswp_ui_template | 1,271 | 9.78 | 84.78 | 34.78 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,272 | 9.49 | 83.60 | 30.53 |
Get Started /wp-admin/admin.php?page=better-sharing-general | 1,252 | 9.47 | 73.16 | 58.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/better-sharing/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- This plugin did not uninstall successfully, leaving 9 options in the database
- can_compress_scripts
- widget_recent-posts
- fs_active_plugins
- theysaidso_admin_options
- fs_accounts
- db_upgraded
- widget_theysaidso_widget
- fs_debug_mode
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/ui-template/modules-container.php
- > /wp-content/plugins/better-sharing/includes/templates/bswp-modules-container.php
- 79× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Warning
include(): Failed opening 'BETTER_SHARING_ADMIN_TEMPLATE_PATHui-template/template-parts/social-share-module.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/ui-template/modules-container.php on line 9
- > PHP Fatal error
Uncaught Error: Class 'BetterSharingWP\\AddOnsCore' not found in wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/addons-page.php:13
- > PHP Warning
Use of undefined constant BETTER_SHARING_ADMIN_TEMPLATE_PATH - assumed 'BETTER_SHARING_ADMIN_TEMPLATE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/ui-template/modules-container.php on line 9
- > PHP Warning
Use of undefined constant BETTER_SHARING_PATH - assumed 'BETTER_SHARING_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/better-sharing/includes/templates/bswp-modules-container.php on line 10
- > PHP Notice
Undefined variable: is_full_view_hidden in wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/ui-template/template-parts/view-style/ui-template-full.php on line 1
- > PHP Warning
Use of undefined constant BETTER_SHARING_PATH - assumed 'BETTER_SHARING_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/plugin-settings/email-sending.php on line 5
- > PHP Warning
Use of undefined constant BETTER_SHARING_ADMIN_TEMPLATE_PATH - assumed 'BETTER_SHARING_ADMIN_TEMPLATE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/ui-template/modules-container.php on line 10
- > PHP Warning
Use of undefined constant BETTER_SHARING_PATH - assumed 'BETTER_SHARING_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/better-sharing/includes/templates/bswp-modules-container.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/ui-template/template-parts/email-module.php:18
- > PHP Notice
Undefined variable: default_settings in wp-content/plugins/better-sharing/includes/AdminScreens/admin-templates/ui-template/template-parts/ui-template-modules/social_share.php on line 5
- > PHP Warning
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)
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 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
4 plugin tags: sharing, contact picker, cloudsponge, woocommerce
better-sharing/BetterSharingWP.php 85% from 13 tests
The main PHP script in "Better Sharing" version 2.3.1 is automatically included on every request by WordPress
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("better-sharing.php" instead of "BetterSharingWP.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
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 detected40,894 lines of code in 210 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 173 | 9,390 | 19,079 | 38,003 |
Sass | 4 | 189 | 0 | 1,309 |
JavaScript | 14 | 195 | 303 | 1,159 |
Markdown | 2 | 89 | 0 | 248 |
HTML | 1 | 8 | 1 | 78 |
JSON | 1 | 0 | 0 | 52 |
SVG | 2 | 0 | 0 | 32 |
CSS | 13 | 0 | 0 | 13 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 71.62 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.36 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 9 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 68 | |
▷ Abstract classes | 3 | 4.41% |
▷ Concrete classes | 65 | 95.59% |
▷ Final classes | 0 | 0.00% |
Methods | 1,454 | |
▷ Static methods | 219 | 15.06% |
▷ Public methods | 1,050 | 72.21% |
▷ Protected methods | 18 | 1.24% |
▷ Private methods | 386 | 26.55% |
Functions | 108 | |
▷ Named functions | 99 | 91.67% |
▷ Anonymous functions | 9 | 8.33% |
Constants | 149 | |
▷ Global constants | 102 | 68.46% |
▷ Class constants | 47 | 31.54% |
▷ Public constants | 47 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |