Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.02MB] [CPU: ▼296.58ms] Passed 4 tests
An overview of server-side resources used by ImageSnippets Gallery
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.01 | 60.42 ▲6.00 |
Dashboard /wp-admin | 3.41 ▲0.00 | 36.05 ▲0.15 |
Posts /wp-admin/edit.php | 3.64 ▲0.00 | 42.55 ▲2.79 |
Add New Post /wp-admin/post-new.php | 6.88 ▼0.09 | 96.96 ▼1,186.33 |
Media Library /wp-admin/upload.php | 3.29 ▲0.00 | 28.37 ▼2.94 |
Server storage [IO: ▲6.99MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 1,154 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for ImageSnippets Gallery
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,770 ▲16 | 15.55 ▼0.13 | 6.27 ▲0.41 | 2.09 ▼0.50 |
Dashboard /wp-admin | 2,881 ▲20 | 6.00 ▼0.18 | 118.12 ▼13.33 | 161.21 ▼1.79 |
Posts /wp-admin/edit.php | 2,694 ▲3 | 3.24 ▲0.01 | 64.09 ▲0.14 | 141.27 ▼3.87 |
Add New Post /wp-admin/post-new.php | 1,752 ▲41 | 21.19 ▲0.00 | 405.46 ▼117.62 | 156.31 ▼3.35 |
Media Library /wp-admin/upload.php | 1,698 ▲3 | 5.51 ▲0.03 | 148.93 ▼11.42 | 188.55 ▼27.74 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 fix the following items
- 5× PHP files output text when accessed directly:
- > /wp-content/plugins/image-snippet/image-snippet.php
- > /wp-content/plugins/image-snippet/class.imagesnippet.php
- > /wp-content/plugins/image-snippet/assets/libs/rdf/vendor/bin/sami.php
- > /wp-content/plugins/image-snippet/index.php
- > /wp-content/plugins/image-snippet/assets/libs/rdf/vendor/phpunit/phpunit/build/assertions.php
- 524× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/phpunit/php-code-coverage/Tests/_files/CoverageFunctionParenthesesWhitespaceTest.php:2
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeCoverage_Report_HTML_Renderer' not found in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Report/HTML/Renderer/File.php:71
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/symfony/console/Tests/Fixtures/TestCommand.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/phpunit/phpunit/Tests/Regression/GitHub/765/Issue765Test.php:2
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/symfony/console/Tests/Fixtures/Foo1Command.php:7
- > PHP Fatal error
Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/image-snippet/assets/libs/httpful/src/Httpful/Handlers/JsonHandler.php:9
- > PHP Warning
Use of undefined constant STDOUT - assumed 'STDOUT' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php on line 21
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_Comparator' not found in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/phpunit/phpunit/PHPUnit/Framework/Comparator/Scalar.php:57
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/symfony/console/Tests/Input/ArrayInputTest.php:19
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' not found in wp-content/plugins/image-snippet/assets/libs/rdf/vendor/symfony/process/Pipes/UnixPipes.php:23
- > 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 93% from 29 tests
readme.txt 88% 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
Attributes that need to be fixed:
- Screenshots: Screenshot #1 (Use settings to generate your gallery) image required
- Contributors: Plugin contributors field is missing
image-snippet/image-snippet.php Passed 13 tests
This is the main PHP file of "ImageSnippets Gallery" version 2.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
57 characters long description:
Create a responsive image gallery using ImageSnippets.com
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
It is important to fix the following items
- Do not distribute dangerous files with your plugin
- .exe - Executable in Windows
- ☣ wp-content/plugins/image-snippet/assets/libs/rdf/vendor/symfony/console/Resources/bin/hiddeninput.exe
- .bat - Batch File in Windows
- ☣ wp-content/plugins/image-snippet/assets/libs/rdf/vendor/bin/phpcs.bat
- ☣ wp-content/plugins/image-snippet/assets/libs/rdf/vendor/bin/phpunit.bat
- ☣ wp-content/plugins/image-snippet/assets/libs/rdf/vendor/bin/sami.php.bat
- .exe - Executable in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 811 | 16,132 | 44,578 | 70,668 |
CSS | 8 | 1,079 | 318 | 4,583 |
YAML | 24 | 145 | 89 | 3,217 |
Markdown | 45 | 646 | 0 | 1,810 |
XML | 53 | 135 | 51 | 1,706 |
JSON | 32 | 2 | 0 | 1,656 |
Ant | 4 | 102 | 0 | 678 |
SVG | 1 | 0 | 0 | 655 |
JavaScript | 11 | 122 | 60 | 488 |
XSD | 1 | 0 | 0 | 251 |
HTML | 1 | 1 | 0 | 43 |
Bourne Shell | 2 | 6 | 10 | 18 |
DOS Batch | 3 | 0 | 0 | 9 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 124)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 9.66 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 520.00 |
Average method complexity | 2.55 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 124.00 |
Code structure | ||
---|---|---|
Namespaces | 60 | |
Interfaces | 48 | |
Traits | 0 | |
Classes | 835 | |
▷ Abstract classes | 37 | 4.43% |
▷ Concrete classes | 798 | 95.57% |
▷ Final classes | 5 | 0.63% |
Methods | 5,089 | |
▷ Static methods | 509 | 10.00% |
▷ Public methods | 4,270 | 83.91% |
▷ Protected methods | 602 | 11.83% |
▷ Private methods | 217 | 4.26% |
Functions | 329 | |
▷ Named functions | 199 | 60.49% |
▷ Anonymous functions | 130 | 39.51% |
Constants | 230 | |
▷ Global constants | 21 | 9.13% |
▷ Class constants | 209 | 90.87% |
▷ Public constants | 209 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.39MB with 0.12MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 13.23KB | 8.14KB | ▼ 38.45% |
assets/libs/rdf/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Report/HTML/Renderer/Template/img/glyphicons-halflings-white.png | 8.57KB | 9.20KB | 0.00% |
assets/libs/rdf/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Report/HTML/Renderer/Template/img/glyphicons-halflings.png | 12.50KB | 10.35KB | ▼ 17.19% |
assets/images/bg.png | 366.39KB | 115.45KB | ▼ 68.49% |