Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.19MB] [CPU: ▲3.11ms] Passed 4 tests
Server-side resources used by WP Simple Elasticsearch
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.18 | 44.86 ▼0.53 |
Dashboard /wp-admin | 3.49 ▲0.19 | 58.74 ▼0.88 |
Posts /wp-admin/edit.php | 3.61 ▲0.25 | 55.51 ▲6.64 |
Add New Post /wp-admin/post-new.php | 6.07 ▲0.19 | 100.41 ▲11.59 |
Media Library /wp-admin/upload.php | 3.41 ▲0.19 | 41.51 ▲7.21 |
WP Simple Elasticsearch /wp-admin/options-general.php?page=wp_elasticsearch | 3.38 | 37.07 |
Server storage [IO: ▲3.94MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 998 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for WP Simple Elasticsearch
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,796 ▲35 | 14.27 ▼0.09 | 1.49 ▼0.44 | 42.77 ▼5.25 |
Dashboard /wp-admin | 2,199 ▲22 | 5.67 ▲0.14 | 94.26 ▲2.19 | 43.24 ▲2.57 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.00 ▲0.02 | 42.94 ▲2.66 | 36.20 ▼10.48 |
Add New Post /wp-admin/post-new.php | 1,543 ▲4 | 17.88 ▼0.19 | 608.50 ▼25.12 | 63.71 ▲3.32 |
Media Library /wp-admin/upload.php | 1,401 ▼2 | 4.23 ▲0.04 | 98.40 ▼6.34 | 45.13 ▲2.44 |
WP Simple Elasticsearch /wp-admin/options-general.php?page=wp_elasticsearch | 964 | 2.29 | 23.71 | 32.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
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)
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
Almost there! Just fix the following items
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wp-simple-elasticsearch/vendor/squizlabs/php_codesniffer/scripts/build-phar.php
- 706× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Elastica\\Test\\Aggregation\\BaseAggregationTest' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/HistogramTest.php:9
- > PHP Fatal error
Uncaught Error: Class 'Elastica\\Bulk\\Action\\AbstractDocument' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/lib/Elastica/Bulk/Action/DeleteDocument.php:7
- > PHP Fatal error
Uncaught Error: Class 'Elastica\\Filter\\AbstractFilter' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/lib/Elastica/Filter/Nested.php:17
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/test/bootstrap.php on line 5
- > PHP Fatal error
Uncaught Error: Class 'Elastica\\Filter\\AbstractFilter' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/lib/Elastica/Filter/Regexp.php:15
- > PHP Fatal error
Uncaught Error: Class 'AbstractSniffUnitTest' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/wp-coding-standards/wpcs/WordPress/Tests/NamingConventions/ValidFunctionNameUnitTest.php:31
- > PHP Fatal error
Uncaught Error: Class 'Elastica\\Query\\AbstractQuery' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/lib/Elastica/Query/Common.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Elastica\\Exception\\ExceptionInterface' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/lib/Elastica/Exception/InvalidException.php:10
- > PHP Fatal error
Uncaught Error: Class 'Elastica\\Test\\Base' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/test/lib/Elastica/Test/Query/BuilderTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Elastica\\Test\\DeprecatedClassBase' not found in wp-content/plugins/wp-simple-elasticsearch/vendor/ruflin/elastica/test/lib/Elastica/Test/Filter/BoolOrTest.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
- Screenshots: Add an image for screenshot #1 (Setting Screen)
wp-simple-elasticsearch/wp-elasticsearch.php 69% from 13 tests
This is the main PHP file of "WP Simple Elasticsearch" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Git Repository: Please remove the Git repository from this plugin
- Domain Path: The domain path is invalid: folder "/languages" does not exist
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-simple-elasticsearch.php" instead of "wp-elasticsearch.php")
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
These items require your attention
- Do not include executable or dangerous files in your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/wp-simple-elasticsearch/vendor/squizlabs/php_codesniffer/scripts/phpcbf.bat
- ☣ wp-content/plugins/wp-simple-elasticsearch/vendor/squizlabs/php_codesniffer/scripts/phpcs.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 772 | 16,327 | 36,163 | 62,657 |
XML | 123 | 157 | 195 | 3,960 |
Markdown | 12 | 514 | 0 | 1,425 |
Pascal | 12 | 248 | 316 | 457 |
JSON | 6 | 1 | 0 | 394 |
YAML | 6 | 33 | 27 | 135 |
make | 1 | 36 | 22 | 125 |
Dockerfile | 4 | 20 | 18 | 43 |
Bourne Shell | 1 | 8 | 9 | 37 |
DOS Batch | 2 | 2 | 22 | 16 |
Bourne Again Shell | 1 | 4 | 0 | 10 |
Groovy | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 247)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 10.29 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 519.00 |
Average method complexity | 3.08 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 247.00 |
Code structure | ||
---|---|---|
Namespaces | 55 | |
Interfaces | 12 | |
Traits | 2 | |
Classes | 749 | |
▷ Abstract classes | 29 | 3.87% |
▷ Concrete classes | 720 | 96.13% |
▷ Final classes | 1 | 0.14% |
Methods | 3,455 | |
▷ Static methods | 72 | 2.08% |
▷ Public methods | 3,124 | 90.42% |
▷ Protected methods | 279 | 8.08% |
▷ Private methods | 52 | 1.51% |
Functions | 31 | |
▷ Named functions | 17 | 54.84% |
▷ Anonymous functions | 14 | 45.16% |
Constants | 267 | |
▷ Global constants | 93 | 34.83% |
▷ Class constants | 174 | 65.17% |
▷ Public constants | 174 | 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
1 PNG file occupies 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 122.18KB | 34.66KB | ▼ 71.63% |