Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▼8.27ms] Passed 4 tests
Server-side resources used by Color Palette Generator
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.12 | 42.04 ▲2.31 |
Dashboard /wp-admin | 3.40 ▲0.06 | 52.03 ▼17.98 |
Posts /wp-admin/edit.php | 3.46 ▲0.10 | 52.59 ▲2.89 |
Add New Post /wp-admin/post-new.php | 6.00 ▲0.11 | 84.00 ▼20.28 |
Media Library /wp-admin/upload.php | 3.32 ▲0.10 | 40.36 ▲3.17 |
Color Palette Generator /wp-admin/upload.php?page=color-palette-generator | 3.31 | 46.43 |
Server storage [IO: ▲0.13MB] [DB: ▲0.01MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 9 new options
New WordPress options |
---|
can_compress_scripts |
cpg_options |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
cpg_dominant_color_children |
widget_recent-posts |
widget_cpg_search_widget |
db_upgraded |
Browser metrics Passed 4 tests
Color Palette Generator: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲43 | 14.35 ▼0.00 | 1.89 ▲0.33 | 42.89 ▲0.59 |
Dashboard /wp-admin | 2,206 ▲32 | 5.58 ▲0.06 | 82.01 ▼6.12 | 38.25 ▼7.00 |
Posts /wp-admin/edit.php | 2,114 ▲11 | 1.98 ▼0.04 | 39.44 ▼8.00 | 34.68 ▼1.16 |
Add New Post /wp-admin/post-new.php | 1,536 ▲1 | 23.35 ▲5.34 | 659.89 ▲18.30 | 51.92 ▼14.64 |
Media Library /wp-admin/upload.php | 1,423 ▲23 | 4.19 ▲0.01 | 99.58 ▼3.94 | 46.12 ▲0.72 |
Color Palette Generator /wp-admin/upload.php?page=color-palette-generator | 984 | 2.07 | 38.53 | 30.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- widget_theysaidso_widget
- widget_cpg_search_widget
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 7× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/color-palette-generator/inc/cpg-admin-shared-functions.php
- > /wp-content/plugins/color-palette-generator/color-palette-generator.php
- > /wp-content/plugins/color-palette-generator/inc/cpg-uninstall.php
- > /wp-content/plugins/color-palette-generator/inc/cpg-admin-settings.php
- > /wp-content/plugins/color-palette-generator/inc/cpg-frontend-show-palette-on-attachment.php
- > /wp-content/plugins/color-palette-generator/inc/cpg-admin-layout.php
- > /wp-content/plugins/color-palette-generator/inc/cpg-admin-ajax.php
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/color-palette-generator/templates/search.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/color-palette-generator/inc/cpg-admin-search-rewrites.php:7
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/color-palette-generator/inc/cpg-admin-widget.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: image, colour palette, color, palette, images...
color-palette-generator/color-palette-generator.php 92% from 13 tests
This is the main PHP file of "Color Palette Generator" version 1.7.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected3,513 lines of code in 25 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 196 | 52 | 1,834 |
JavaScript | 6 | 91 | 148 | 1,037 |
CSS | 6 | 98 | 0 | 607 |
Markdown | 1 | 16 | 0 | 35 |
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.39 |
Average class complexity | 5.50 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 1.89 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 53 | |
▷ Named functions | 52 | 98.11% |
▷ Anonymous functions | 1 | 1.89% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin