Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
- The plugin did not install without errors
- > Warning in wp-content/plugins/stackla/includes/class-stackla-wp-remover.php+26
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Server metrics [RAM: ▼1.62MB] [CPU: ▼57.18ms] Passed 4 tests
Analyzing server-side resources used by Stackla
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.37 ▼1.09 | 7.60 ▼36.69 |
Dashboard /wp-admin | 2.39 ▼0.91 | 8.06 ▼47.34 |
Posts /wp-admin/edit.php | 2.39 ▼0.97 | 8.66 ▼42.05 |
Add New Post /wp-admin/post-new.php | 2.39 ▼3.50 | 8.05 ▼102.64 |
Media Library /wp-admin/upload.php | 2.39 ▼0.84 | 8.36 ▼30.51 |
Server storage [IO: ▲9.50MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,294 new files
Database: 1 new table, 6 new options
New tables |
---|
stackla_settings |
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Stackla
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,892 ▲131 | 15.65 ▲1.10 | 5.81 ▲4.31 | 39.47 ▼0.75 |
Dashboard /wp-admin | 2,203 ▲26 | 6.81 ▲1.01 | 119.98 ▲26.11 | 72.49 ▲25.11 |
Posts /wp-admin/edit.php | 2,129 ▲29 | 3.43 ▲1.41 | 51.12 ▲8.89 | 34.60 ▼2.75 |
Add New Post /wp-admin/post-new.php | 1,551 ▲23 | 19.13 ▼3.95 | 701.36 ▲28.02 | 36.91 ▼21.89 |
Media Library /wp-admin/upload.php | 1,415 ▲15 | 5.41 ▲1.10 | 118.39 ▲1.20 | 76.14 ▲26.79 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- This plugin did not uninstall without warnings or errors
- > Warning in wp-content/plugins/stackla/includes/class-stackla-wp-remover.php+26
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 5× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/stackla/includes/vendor/stackla/stackla-php-sdk/tests/callback/access.php
- > /wp-content/plugins/stackla/public/partials/plugin-name-public-display.php
- > /wp-content/plugins/stackla/includes/vendor/stackla/stackla-php-sdk/tests/bootstrap.php
- > /wp-content/plugins/stackla/includes/vendor/stackla/stackla-php-sdk/src/Stackla/Exception/StacklaException.php
- > /wp-content/plugins/stackla/includes/vendor/stackla/stackla-php-sdk/tests/callback/callback.php
- 781× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Validator\\Mapping\\ElementMetadata' not found in wp-content/plugins/stackla/includes/vendor/symfony/validator/Mapping/ClassMetadata.php:30
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/stackla/includes/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php:17
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactoryInterface' not found in wp-content/plugins/stackla/includes/vendor/symfony/validator/Context/ExecutionContextFactory.php:26
- > PHP Fatal error
Uncaught Error: Class 'Guzzle\\Tests\\Parsers\\UriTemplate\\AbstractUriTemplateTest' not found in wp-content/plugins/stackla/includes/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/PeclUriTemplateTest.php:10
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Validator\\Constraint' not found in wp-content/plugins/stackla/includes/vendor/symfony/validator/Constraints/Isbn.php:24
- > PHP Fatal error
Uncaught Error: Class 'Guzzle\\Tests\\Service\\Command\\LocationVisitor\\Request\\AbstractVisitorTestCase' not found in wp-content/plugins/stackla/includes/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/BodyVisitorTest.php:11
- > PHP Fatal error
Uncaught Error: Class 'Guzzle\\Http\\Exception\\BadResponseException' not found in wp-content/plugins/stackla/includes/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ServerErrorResponseException.php:8
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/stackla/includes/vendor/symfony/yaml/Tests/ParserTest.php:17
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Validator\\Constraints\\Optional' not found in wp-content/plugins/stackla/includes/vendor/symfony/validator/Constraints/Collection/Optional.php:27
- > PHP Fatal error
Uncaught Error: Class 'Stackla\\Core\\StacklaModel' not found in wp-content/plugins/stackla/includes/vendor/stackla/stackla-php-sdk/src/Stackla/Api/Widget.php:28
- > PHP Fatal error
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)
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: widget, ugc, social, stackla
stackla/stackla-wp.php 92% from 13 tests
The main PHP file in "Stackla" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("stackla.php" instead of "stackla-wp.php")
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
Success! There were no dangerous files found in this plugin129,128 lines of code in 1,212 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 961 | 15,038 | 29,823 | 66,012 |
JavaScript | 21 | 6,285 | 28,014 | 34,439 |
XML | 69 | 75 | 29 | 14,120 |
YAML | 26 | 143 | 100 | 3,238 |
XSD | 3 | 70 | 28 | 2,594 |
Markdown | 21 | 464 | 0 | 2,016 |
JSON | 46 | 13 | 0 | 1,963 |
reStructuredText | 30 | 1,236 | 1,794 | 1,824 |
JSX | 11 | 115 | 187 | 1,557 |
Sass | 4 | 53 | 0 | 661 |
CSS | 4 | 19 | 6 | 143 |
Ant | 2 | 23 | 1 | 131 |
make | 1 | 24 | 5 | 124 |
SVG | 2 | 0 | 2 | 117 |
HTML | 2 | 16 | 0 | 95 |
Python | 1 | 22 | 23 | 49 |
PO File | 5 | 5 | 0 | 29 |
Qt Linguist | 1 | 0 | 0 | 10 |
INI | 2 | 1 | 0 | 6 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 155)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
Average class complexity | 6.16 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 158.00 |
Average method complexity | 1.96 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 155.00 |
Code structure | ||
---|---|---|
Namespaces | 147 | |
Interfaces | 105 | |
Traits | 0 | |
Classes | 870 | |
▷ Abstract classes | 52 | 5.98% |
▷ Concrete classes | 818 | 94.02% |
▷ Final classes | 14 | 1.71% |
Methods | 5,650 | |
▷ Static methods | 193 | 3.42% |
▷ Public methods | 4,851 | 85.86% |
▷ Protected methods | 624 | 11.04% |
▷ Private methods | 175 | 3.10% |
Functions | 220 | |
▷ Named functions | 5 | 2.27% |
▷ Anonymous functions | 215 | 97.73% |
Constants | 334 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 334 | 100.00% |
▷ Public constants | 334 | 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
19 PNG files occupy 2.23MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/styles/base_slideshow.png | 0.29KB | 0.23KB | ▼ 20.07% |
includes/vendor/guzzle/guzzle/docs/_static/guzzle-icon.png | 0.78KB | 0.94KB | 0.00% |
admin/img/poweredByLogo.png | 3.15KB | 1.43KB | ▼ 54.42% |
admin/img/styles/mrec.png | 0.22KB | 0.18KB | ▼ 19.91% |
admin/img/types/derive.png | 2.48KB | 1.38KB | ▼ 44.42% |