Benchmarks
Plugin footprint 83% from 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.07MB] [CPU: ▼10.54ms] Passed 4 tests
A check of server-side resources used by Dominant Color
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 34.37 ▼6.99 |
Dashboard /wp-admin | 3.38 ▲0.04 | 44.80 ▼14.95 |
Posts /wp-admin/edit.php | 3.49 ▲0.14 | 46.03 ▲0.33 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.10 | 88.35 ▼20.55 |
Media Library /wp-admin/upload.php | 3.30 ▲0.08 | 38.25 ▲3.70 |
Server storage [IO: ▲3.06MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Dominant Color
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲83 | 14.47 ▲0.11 | 1.94 ▲0.15 | 41.96 ▼1.79 |
Dashboard /wp-admin | 2,210 ▲19 | 5.86 ▲0.95 | 101.94 ▼10.82 | 38.04 ▼11.41 |
Posts /wp-admin/edit.php | 2,093 ▲22 | 2.05 ▲0.05 | 40.38 ▲0.42 | 34.89 ▲2.21 |
Add New Post /wp-admin/post-new.php | 1,518 ▼10 | 17.59 ▼0.68 | 660.83 ▲62.90 | 51.07 ▲0.28 |
Media Library /wp-admin/upload.php | 1,392 ▲7 | 4.18 ▼0.10 | 93.77 ▼8.89 | 39.94 ▼3.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
Smoke tests 75% 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 50% 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
- 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/tests/Image/Adapter/BaseImageAdapterTest.php:4
- > PHP Fatal error
Uncaught Error: Class 'ColorThief\\Image\\Adapter\\ImageAdapter' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/lib/ColorThief/Image/Adapter/ImagickImageAdapter.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/tests/VBoxTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'ColorThief\\Image\\Adapter\\Test\\BaseImageAdapterTest' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/tests/Image/Adapter/ImagickImageAdapterTest.php:10
- > PHP Fatal error
Uncaught Error: Class 'ColorThief\\Image\\Adapter\\ImageAdapter' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/lib/ColorThief/Image/Adapter/GDImageAdapter.php:5
- > PHP Fatal error
Uncaught Error: Class 'ColorThief\\Image\\Adapter\\AbstractAdapter' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/src/ColorThief/Image/Adapter/ImagickAdapter.php:24
- > PHP Fatal error
Uncaught Error: Class 'ColorThief\\Image\\Adapter\\AbstractAdapter' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/src/ColorThief/Image/Adapter/GmagickAdapter.php:23
- > PHP Fatal error
Uncaught Error: Interface 'ColorThief\\Exception\\Exception' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/src/ColorThief/Exception/RuntimeException.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dominant-color/dominant-color.php:15
- > PHP Fatal error
Uncaught Error: Interface 'ColorThief\\Image\\Adapter\\AdapterInterface' not found in wp-content/plugins/dominant-color/vendor/ksubileau/color-thief-php/src/ColorThief/Image/Adapter/AbstractAdapter.php:22
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: colour, dominance, automatic, image, color...
dominant-color/dominant-color.php Passed 13 tests
"Dominant Color" version 2.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
88 characters long description:
Add an attachment meta option to provide the hex of the most dominant color of an image.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,244 lines of code in 51 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 41 | 713 | 1,292 | 2,930 |
JSON | 3 | 6 | 0 | 124 |
Markdown | 3 | 44 | 0 | 106 |
YAML | 1 | 6 | 1 | 34 |
XML | 1 | 0 | 0 | 22 |
JavaScript | 1 | 0 | 1 | 16 |
CSS | 1 | 2 | 0 | 12 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 11.35 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 65.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 9 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 31 | |
▷ Abstract classes | 3 | 9.68% |
▷ Concrete classes | 28 | 90.32% |
▷ Final classes | 0 | 0.00% |
Methods | 249 | |
▷ Static methods | 46 | 18.47% |
▷ Public methods | 214 | 85.94% |
▷ Protected methods | 16 | 6.43% |
▷ Private methods | 19 | 7.63% |
Functions | 19 | |
▷ Named functions | 9 | 47.37% |
▷ Anonymous functions | 10 | 52.63% |
Constants | 10 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 10 | 100.00% |
▷ Public constants | 10 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 2.09MB with 1.60MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/ksubileau/color-thief-php/tests/images/pixels.png | 1.13KB | 0.21KB | ▼ 81.56% |
vendor/ksubileau/color-thief-php/tests/images/vegetables_1500x995.png | 2,141.77KB | 620.50KB | ▼ 71.03% |