Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼1.11ms] Passed 4 tests
Server-side resources used by Grayscale
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 39.27 ▲5.39 |
Dashboard /wp-admin | 3.32 ▲0.01 | 45.97 ▼1.21 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 49.92 ▲1.56 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 82.74 ▼5.11 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 34.78 ▲0.34 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Grayscale
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲54 | 13.52 ▼0.85 | 2.11 ▲0.20 | 45.34 ▲4.81 |
Dashboard /wp-admin | 2,206 ▲18 | 5.84 ▲0.83 | 95.61 ▼21.49 | 38.98 ▼3.71 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.96 ▼0.09 | 41.78 ▲4.61 | 33.82 ▲1.34 |
Add New Post /wp-admin/post-new.php | 1,514 ▼19 | 17.51 ▼5.68 | 670.11 ▼10.54 | 58.97 ▲3.80 |
Media Library /wp-admin/upload.php | 1,382 ▼9 | 4.26 ▼0.10 | 97.24 ▼4.46 | 43.29 ▼0.36 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% 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 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
Please fix the following items
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/grayscale/grayscale.php:25
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/grayscale/class-grayscale-image-editor.php on line 3
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-includes/class-wp-image-editor.php' (include_path='.:/usr/share/php') in wp-content/plugins/grayscale/class-grayscale-image-editor.php on line 3
- > PHP Warning
require_once(ABSPATHwp-includes/class-wp-image-editor.php): failed to open stream: No such file or directory in wp-content/plugins/grayscale/class-grayscale-image-editor.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 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
4 plugin tags: thumbnail, images, image, grayscale
grayscale/grayscale.php Passed 13 tests
The primary PHP file in "Grayscale" version 1.2 is used by WordPress to initiate all plugin functionality
64 characters long description:
Automatically create grayscale thumbnails for a given image size
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin89 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 14 | 24 | 69 |
Markdown | 1 | 10 | 0 | 20 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 2.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 2.00 |
Average method complexity | 2.00 |
▷ Minimum method complexity | 2.00 |
▷ Maximum method complexity | 2.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 1 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 1 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
PNG images were not found in this plugin