Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲4.79MB] [CPU: ▼262.79ms] 75% from 4 tests
A check of server-side resources used by Sparrow: Product Reviews and Ratings for WooCommerce
It is recommended to improve the following
- CPU: Try to keep total CPU usage under 500.00ms (currently 1,622.50ms on /wp-admin/options-general.php?page=getsparrow)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.62 ▲5.11 | 107.18 ▲33.75 |
Dashboard /wp-admin | 8.64 ▲5.23 | 85.51 ▲38.62 |
Posts /wp-admin/edit.php | 8.64 ▲5.00 | 91.18 ▲28.87 |
Add New Post /wp-admin/post-new.php | 10.80 ▲3.83 | 160.94 ▼1,147.53 |
Media Library /wp-admin/upload.php | 8.64 ▲5.35 | 81.59 ▲33.75 |
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius | 8.64 | 66.38 |
Sparrow /wp-admin/options-general.php?page=getsparrow | 8.64 | 1,622.50 |
Server storage [IO: ▲3.83MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 389 new files
Database: no new tables, 5 new options
New WordPress options |
---|
fs_active_plugins |
fs_accounts |
woocommerce_enable_reviews |
fs_gdpr |
fs_debug_mode |
Browser metrics Passed 4 tests
Sparrow: Product Reviews and Ratings for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,015 ▲261 | 16.95 ▲1.46 | 49.70 ▲40.77 | 2.74 ▼0.94 |
Dashboard /wp-admin | 2,990 ▲130 | 6.21 ▲0.10 | 165.42 ▼4.77 | 231.91 ▲7.44 |
Posts /wp-admin/edit.php | 2,783 ▲92 | 3.22 ▼0.02 | 88.68 ▲10.15 | 204.78 ▲15.26 |
Add New Post /wp-admin/post-new.php | 1,716 ▲48 | 16.50 ▼2.28 | 632.52 ▼124.33 | 228.35 ▼26.73 |
Media Library /wp-admin/upload.php | 1,791 ▲96 | 5.57 ▲0.04 | 210.05 ▼30.37 | 283.82 ▼30.00 |
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius | 1,439 | 2.53 | 76.43 | 144.68 |
Sparrow /wp-admin/options-general.php?page=getsparrow | 1,289 | 2.61 | 64.50 | 196.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- Zombie WordPress options were found after uninstall: 5 options
- fs_active_plugins
- fs_accounts
- fs_debug_mode
- fs_gdpr
- woocommerce_enable_reviews
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
SRP 0% 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 take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/sparrow/freemius/templates/ajax-loader.php
- 108× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Doctrine\\Common\\Cache\\CacheProvider' not found in wp-content/plugins/sparrow/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php:38
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sparrow/public/partials/getsparrow-public-display.php:20
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/sparrow/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sparrow/vendor/kevinrob/guzzle-cache-middleware/tests/Strategy/GreedyCacheStrategyTest.php:15
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/sparrow/vendor/guzzlehttp/promises/src/FulfilledPromise.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sparrow/vendor/kevinrob/guzzle-cache-middleware/tests/ResponseAgeTest.php:13
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sparrow/vendor/kevinrob/guzzle-cache-middleware/tests/InvalidateCacheTest.php:12
- > PHP Fatal error
Uncaught Error: Class 'Doctrine\\Common\\Cache\\FileCache' not found in wp-content/plugins/sparrow/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php:17
- > PHP Fatal error
Uncaught Error: Interface 'Kevinrob\\GuzzleCache\\Storage\\CacheStorageInterface' not found in wp-content/plugins/sparrow/vendor/kevinrob/guzzle-cache-middleware/src/Storage/Psr6CacheStorage.php:9
- > PHP Fatal error
Uncaught Error: Interface 'Kevinrob\\GuzzleCache\\Storage\\CacheStorageInterface' not found in wp-content/plugins/sparrow/vendor/kevinrob/guzzle-cache-middleware/src/Storage/CompressedDoctrineCacheStorage.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 81% 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 need to be fixed:
- Donate link: Invalid URI found ("")
- Requires php: The plugin version is formatted incorrectly
- Screenshots: Please add descriptions for these screenshots #2, #3, #4 in sparrow/assets to your readme.txt
sparrow/getsparrow.php 85% from 13 tests
"Sparrow: Product Reviews and Ratings for WooCommerce" version 2.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sparrow.php" instead of "getsparrow.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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected48,186 lines of code in 330 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 281 | 10,190 | 23,301 | 43,362 |
Markdown | 14 | 1,138 | 0 | 3,695 |
JSON | 10 | 0 | 0 | 794 |
JavaScript | 5 | 38 | 113 | 200 |
YAML | 3 | 14 | 0 | 58 |
XML | 2 | 9 | 0 | 44 |
CSS | 13 | 0 | 8 | 14 |
Dockerfile | 1 | 8 | 0 | 10 |
make | 1 | 4 | 0 | 9 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
The following items need your attention
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,895)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.55 |
Average class complexity | 27.80 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,895.00 |
Average method complexity | 3.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 15 | |
Interfaces | 25 | |
Traits | 2 | |
Classes | 174 | |
▷ Abstract classes | 4 | 2.30% |
▷ Concrete classes | 170 | 97.70% |
▷ Final classes | 11 | 6.47% |
Methods | 2,214 | |
▷ Static methods | 251 | 11.34% |
▷ Public methods | 1,550 | 70.01% |
▷ Protected methods | 194 | 8.76% |
▷ Private methods | 470 | 21.23% |
Functions | 267 | |
▷ Named functions | 154 | 57.68% |
▷ Anonymous functions | 113 | 42.32% |
Constants | 216 | |
▷ Global constants | 99 | 45.83% |
▷ Class constants | 117 | 54.17% |
▷ Public constants | 113 | 96.58% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB 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% |
freemius/assets/img/sparrow.png | 3.13KB | 1.83KB | ▼ 41.53% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |