Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼1.54ms] Passed 4 tests
Server-side resources used by Swiftype Site Search Plugin for Wordpress
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 36.63 ▲0.56 |
Dashboard /wp-admin | 3.36 ▲0.06 | 47.67 ▲1.24 |
Posts /wp-admin/edit.php | 3.47 ▲0.12 | 45.56 ▼5.84 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.06 | 83.19 ▲1.92 |
Media Library /wp-admin/upload.php | 3.28 ▲0.06 | 33.20 ▼2.13 |
Server storage [IO: ▲8.83MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,167 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_swiftype_search_widget |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Swiftype Site Search Plugin for Wordpress
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,817 ▲46 | 14.73 ▲0.15 | 1.69 ▼0.17 | 43.91 ▲1.60 |
Dashboard /wp-admin | 2,224 ▲36 | 5.88 ▼0.01 | 94.20 ▼5.56 | 89.80 ▲48.03 |
Posts /wp-admin/edit.php | 2,107 ▲18 | 2.01 ▼0.01 | 33.55 ▼6.92 | 35.16 ▼0.67 |
Add New Post /wp-admin/post-new.php | 1,681 ▲139 | 22.44 ▲4.22 | 651.25 ▲54.84 | 58.73 ▲7.50 |
Media Library /wp-admin/upload.php | 1,400 ▲12 | 4.13 ▼0.07 | 110.13 ▲12.60 | 44.30 ▲1.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- The uninstall procedure has failed, leaving 7 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- widget_swiftype_search_widget
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/swiftype-search/Tests/bootstrap.php
- > /wp-content/plugins/swiftype-search/templates/admin/common/header.php
- 172× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/swiftype-search/vendor/elastic/site-search/Tests/Unit/Connection/Handler/RequestClientHeaderHandlerTest.php:19
- > PHP Fatal error
Uncaught Error: Interface 'React\\Promise\\PromiseInterface' not found in wp-content/plugins/swiftype-search/vendor/guzzlehttp/ringphp/src/Future/FutureInterface.php:19
- > PHP Fatal error
Uncaught Error: Class 'React\\Promise\\TestCase' not found in wp-content/plugins/swiftype-search/vendor/react/promise/tests/FunctionResolveTest.php:5
- > PHP Fatal error
Uncaught Error: Class 'Elastic\\OpenApi\\Codegen\\Exception\\ApiException' not found in wp-content/plugins/swiftype-search/vendor/elastic/openapi-codegen/Exception/AuthenticationException.php:18
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/swiftype-search/Tests/AbstractTestCase.php:8
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/swiftype-search/templates/admin/controls/search-settings.php:6
- > PHP Fatal error
Uncaught Error: Class 'Elastic\\OpenApi\\Codegen\\Endpoint\\AbstractEndpoint' not found in wp-content/plugins/swiftype-search/vendor/elastic/site-search/Endpoint/ListDocuments.php:16
- > PHP Fatal error
Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/swiftype-search/Cli/Command.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Elastic\\OpenApi\\Codegen\\Exception\\ClientException' not found in wp-content/plugins/swiftype-search/vendor/elastic/openapi-codegen/Exception/JsonErrorException.php:20
- > PHP Fatal error
Uncaught Error: Class 'Elastic\\OpenApi\\Codegen\\Endpoint\\AbstractEndpoint' not found in wp-content/plugins/swiftype-search/vendor/elastic/site-search/Endpoint/GetTopQueriesAnalyticsEngine.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
- Donate link: Invalid URI found ("")
swiftype-search/swiftype.php 85% from 13 tests
The main PHP file in "Swiftype Site Search Plugin for Wordpress" ver. 2.0.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Description: The description should be shorter than 140 characters (currently 256 characters long)
- Main file name: The principal plugin file should be the same as the plugin slug ("swiftype-search.php" instead of "swiftype.php")
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
These items require your attention
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .cmd - Command Script in Windows
- ☣ wp-content/plugins/swiftype-search/node_modules/grunt/test/fixtures/exec.cmd
- .cmd - Command Script in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 443 | 18,995 | 32,563 | 101,131 |
PHP | 248 | 3,475 | 5,593 | 15,750 |
Markdown | 66 | 4,586 | 0 | 11,032 |
HTML | 9 | 399 | 8 | 2,865 |
JSON | 55 | 0 | 0 | 2,842 |
YAML | 22 | 192 | 41 | 1,481 |
CSS | 5 | 181 | 27 | 778 |
XML | 14 | 18 | 0 | 697 |
reStructuredText | 9 | 263 | 333 | 517 |
Bourne Shell | 8 | 58 | 23 | 279 |
Mustache | 16 | 74 | 0 | 247 |
make | 4 | 48 | 5 | 190 |
Maven | 1 | 7 | 1 | 121 |
Ruby | 3 | 19 | 2 | 108 |
Java | 1 | 25 | 0 | 100 |
Dockerfile | 3 | 21 | 7 | 44 |
Python | 1 | 4 | 0 | 19 |
CoffeeScript | 1 | 7 | 8 | 13 |
Bourne Again Shell | 1 | 3 | 0 | 11 |
DOS Batch | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 4.32 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 89.00 |
Average method complexity | 1.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 41 | |
Interfaces | 15 | |
Traits | 14 | |
Classes | 203 | |
▷ Abstract classes | 5 | 2.46% |
▷ Concrete classes | 198 | 97.54% |
▷ Final classes | 1 | 0.51% |
Methods | 1,303 | |
▷ Static methods | 58 | 4.45% |
▷ Public methods | 1,170 | 89.79% |
▷ Protected methods | 29 | 2.23% |
▷ Private methods | 104 | 7.98% |
Functions | 310 | |
▷ Named functions | 18 | 5.81% |
▷ Anonymous functions | 292 | 94.19% |
Constants | 35 | |
▷ Global constants | 1 | 2.86% |
▷ Class constants | 34 | 97.14% |
▷ Public constants | 34 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 1.36MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 172.01KB | 48.05KB | ▼ 72.06% |
node_modules/grunt/test/fixtures/octocat.png | 3.89KB | 2.53KB | ▼ 34.91% |
assets/screenshot-2.png | 169.55KB | 47.43KB | ▼ 72.02% |
assets/banner-1544x500.png | 551.32KB | 183.23KB | ▼ 66.76% |
assets/swiftype_logo_menu.png | 1.13KB | 0.82KB | ▼ 27.70% |