Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.28MB] [CPU: ▼3.16ms] Passed 4 tests
A check of server-side resources used by Shutterstock
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.72 ▲0.26 | 41.19 ▲2.23 |
Dashboard /wp-admin | 3.63 ▲0.32 | 46.88 ▲1.15 |
Posts /wp-admin/edit.php | 3.68 ▲0.32 | 48.01 ▲4.08 |
Add New Post /wp-admin/post-new.php | 6.18 ▲0.29 | 82.11 ▼19.54 |
Media Library /wp-admin/upload.php | 3.49 ▲0.26 | 36.85 ▲3.51 |
Shutterstock /wp-admin/upload.php?page=shutterstock_media_page | 3.46 | 37.14 |
Shutterstock /wp-admin/options-general.php?page=shutterstock_options_page | 3.47 | 28.70 |
Server storage [IO: ▲0.99MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 131 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Shutterstock
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,916 ▲155 | 14.56 ▲0.16 | 25.82 ▲24.27 | 73.00 ▲31.11 |
Dashboard /wp-admin | 2,207 ▲30 | 5.51 ▼0.17 | 81.16 ▼6.00 | 39.66 ▼4.48 |
Posts /wp-admin/edit.php | 2,109 ▲30 | 2.14 ▲0.12 | 35.32 ▲0.41 | 32.38 ▼2.90 |
Add New Post /wp-admin/post-new.php | 6,219 ▲4,693 | 19.84 ▼3.28 | 959.10 ▲314.34 | 47.86 ▼19.42 |
Media Library /wp-admin/upload.php | 1,415 ▲18 | 4.17 ▼0.08 | 95.28 ▼18.96 | 61.70 ▲15.03 |
Shutterstock /wp-admin/upload.php?page=shutterstock_media_page | 948 | 8.40 | 176.41 | 41.57 |
Shutterstock /wp-admin/options-general.php?page=shutterstock_options_page | 1,032 | 2.00 | 22.22 | 25.23 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 3× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/shutterstock/admin/partials/shutterstock-media-shutterstock.php
- > /wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-display.php
- > /wp-content/plugins/shutterstock/public/partials/shutterstock-public-display.php
- 8× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-field-user-settings.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-settings-page.php:18
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-field-text.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-field-textarea.php:14
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-field-shutterstock-login-button.php on line 14
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-network-settings-page.php:23
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-field-shutterstock-login-button.php:40
- > PHP Notice
Undefined variable: atts in wp-content/plugins/shutterstock/admin/partials/shutterstock-admin-field-shutterstock-login-button.php on line 14
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
- > GET request to /wp-admin/upload.php?page=shutterstock_media_page
- > Network (severe)
https://api.shutterstock.com/v2/images/search?api_key=&sort=popular&image_type[]=photo&page=1&per_page=26&language=en - Failed to load resource: the server responded with a status of 401 (Invalid auth credentials)
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: media library, editorial images, stock photography, licensing, shutterstock...
shutterstock/shutterstock.php Passed 13 tests
The main file in "Shutterstock" v. 1.3.12 serves as a complement to information provided in readme.txt and as the entry point to the plugin
65 characters long description:
Access exceptional, royalty-free content straight from WordPress.
Code Analysis Passed 3 tests
File types Passed 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
Success! There were no dangerous files found in this plugin6,059 lines of code in 95 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 42 | 0 | 0 | 2,646 |
PO File | 21 | 840 | 1,155 | 2,085 |
PHP | 23 | 372 | 669 | 1,232 |
CSS | 4 | 9 | 8 | 61 |
SVG | 1 | 0 | 0 | 27 |
JavaScript | 4 | 4 | 54 | 8 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.21 |
Average class complexity | 11.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 45.00 |
Average method complexity | 2.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 68 | |
▷ Static methods | 2 | 2.94% |
▷ Public methods | 54 | 79.41% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 14 | 20.59% |
Functions | 4 | |
▷ Named functions | 3 | 75.00% |
▷ Anonymous functions | 1 | 25.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
8 PNG files occupy 0.53MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/browse_button.png | 20.51KB | 8.23KB | ▼ 59.89% |
assets/icon-128x128.png | 4.64KB | 1.34KB | ▼ 71.09% |
assets/icon-256x256.png | 6.83KB | 2.45KB | ▼ 64.22% |
assets/inserted_image.png | 70.68KB | 25.45KB | ▼ 64.00% |
assets/plugin-settings.png | 38.04KB | 15.52KB | ▼ 59.21% |