Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.36MB] [CPU: ▼1.87ms] Passed 4 tests
This is a short check of server-side resources used by SVG Support
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.83 ▲0.37 | 39.44 ▼4.13 |
Dashboard /wp-admin | 3.70 ▲0.40 | 48.34 ▲1.05 |
Posts /wp-admin/edit.php | 3.75 ▲0.39 | 50.98 ▲1.83 |
Add New Post /wp-admin/post-new.php | 6.24 ▲0.35 | 81.46 ▼6.21 |
Media Library /wp-admin/upload.php | 3.56 ▲0.33 | 38.24 ▲5.87 |
SVG Support /wp-admin/options-general.php?page=svg-support | 3.68 | 38.08 |
Server storage [IO: ▲2.52MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 110 new files
Database: no new tables, 8 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
bodhi_svgs_plugin_version |
widget_recent-posts |
can_compress_scripts |
bodhi_svgs_settings |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for SVG Support
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,813 ▲56 | 13.27 ▼0.97 | 1.62 ▼0.91 | 37.07 ▼13.30 |
Dashboard /wp-admin | 2,216 ▲25 | 4.94 ▲0.11 | 108.36 ▲6.47 | 38.14 ▼5.82 |
Posts /wp-admin/edit.php | 2,105 ▲13 | 2.10 ▲0.13 | 40.72 ▲1.69 | 36.79 ▲0.19 |
Add New Post /wp-admin/post-new.php | 1,542 ▲28 | 23.49 ▲5.90 | 660.25 ▲58.97 | 72.08 ▲22.63 |
Media Library /wp-admin/upload.php | 1,400 ▲12 | 4.27 ▲0.03 | 97.09 ▼2.29 | 41.76 ▼2.02 |
SVG Support /wp-admin/options-general.php?page=svg-support | 2,091 | 1.87 | 30.08 | 50.10 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin did not uninstall successfully, leaving 8 options in the database
- bodhi_svgs_settings
- db_upgraded
- bodhi_svgs_plugin_version
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for 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
The following issues need your attention
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/src/svg-scanner.php
- 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
array_values() expects parameter 1 to be array, null given in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/src/svg-scanner.php on line 70
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/tests/AllowedAttributesTest.php:10
- > PHP Fatal error
Uncaught Error: Interface 'enshrined\\svgSanitize\\data\\AttributeInterface' not found in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/tests/Fixtures/TestAllowedAttributes.php:6
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/tests/SanitizerTest.php:12
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/tests/SubjectTest.php:10
- > PHP Fatal error
Uncaught Error: Interface 'enshrined\\svgSanitize\\data\\TagInterface' not found in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/src/data/AllowedTags.php:12
- > PHP Fatal error
Uncaught Error: Interface 'enshrined\\svgSanitize\\data\\AttributeInterface' not found in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/src/data/AllowedAttributes.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/svg-support/admin/svgs-settings-page.php:4
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/tests/AllowedTagsTest.php:10
- > PHP Fatal error
Uncaught Error: Interface 'enshrined\\svgSanitize\\data\\TagInterface' not found in wp-content/plugins/svg-support/vendor/enshrined/svg-sanitize/tests/Fixtures/TestAllowedTags.php:6
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
- Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
svg-support/svg-support.php Passed 13 tests
"SVG Support" version 2.5.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
138 characters long description:
Upload SVG files to the Media Library and render SVG files inline for direct styling/animation of an SVG's internal elements using CSS/JS.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin106,741 lines of code in 100 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 24 | 20,040 | 8 | 100,749 |
PHP | 43 | 984 | 1,115 | 3,232 |
JavaScript | 12 | 539 | 452 | 1,698 |
Sass | 5 | 55 | 9 | 423 |
PO File | 2 | 102 | 96 | 367 |
JSON | 2 | 0 | 0 | 88 |
HTML | 1 | 47 | 0 | 56 |
Markdown | 1 | 43 | 0 | 49 |
XML | 3 | 5 | 0 | 39 |
YAML | 2 | 12 | 5 | 35 |
CSS | 5 | 0 | 0 | 5 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 7.09 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 2.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 2 | |
Traits | 0 | |
Classes | 21 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 21 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 131 | |
▷ Static methods | 24 | 18.32% |
▷ Public methods | 109 | 83.21% |
▷ Protected methods | 21 | 16.03% |
▷ Private methods | 1 | 0.76% |
Functions | 45 | |
▷ Named functions | 42 | 93.33% |
▷ Anonymous functions | 3 | 6.67% |
Constants | 3 | |
▷ Global constants | 2 | 66.67% |
▷ Class constants | 1 | 33.33% |
▷ Public constants | 1 | 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
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
svg-support.png | 37.32KB | 17.57KB | ▼ 52.93% |
admin/img/shortpixel.png | 3.29KB | 3.33KB | 0.00% |