Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
- Install procedure had errors
- > Warning in wp-content/plugins/wp-drupal-imagecache/controller/class-wpdi-common.php+341
unlink(/var/lib/php/sessions/sample.png): No such file or directory
Server metrics [RAM: ▲0.40MB] [CPU: ▼6.80ms] Passed 4 tests
Analyzing server-side resources used by Thumbnails like in Drupal
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.85 ▲0.39 | 38.93 ▲1.64 |
Dashboard /wp-admin | 3.73 ▲0.43 | 43.66 ▼2.25 |
Posts /wp-admin/edit.php | 3.76 ▲0.41 | 42.04 ▼4.29 |
Add New Post /wp-admin/post-new.php | 6.34 ▲0.45 | 71.96 ▼22.29 |
Media Library /wp-admin/upload.php | 3.60 ▲0.37 | 35.75 ▲3.38 |
Thumbnails like in Drupal /wp-admin/options-general.php?page=wp-drupal-imagecache | 3.61 | 34.59 |
Server storage [IO: ▲0.33MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 8 new options
New WordPress options |
---|
wpdi_sample_image_id |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
wpdi_presets |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Thumbnails like in Drupal
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,795 ▲34 | 14.36 ▼0.18 | 1.69 ▲0.08 | 42.17 ▼0.26 |
Dashboard /wp-admin | 2,201 ▲21 | 5.62 ▼0.01 | 90.95 ▲3.24 | 38.30 ▲1.35 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.00 ▲0.06 | 33.30 ▼3.63 | 33.38 ▼0.75 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.11 ▲0.04 | 663.39 ▼14.05 | 50.06 ▼12.61 |
Media Library /wp-admin/upload.php | 1,446 ▲43 | 4.34 ▲0.19 | 98.79 ▼3.97 | 41.34 ▼1.30 |
Thumbnails like in Drupal /wp-admin/options-general.php?page=wp-drupal-imagecache | 1,203 | 2.05 | 24.44 | 29.93 |
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
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=wp-drupal-imagecache
- > Notice in wp-content/plugins/wp-drupal-imagecache/views/settings-page.php+12
Undefined variable: error
- > GET request to /wp-admin/options-general.php?page=wp-drupal-imagecache
- > Notice in wp-content/plugins/wp-drupal-imagecache/views/settings-page.php+13
Undefined variable: success
SRP Passed 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
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
7 plugin tags: imagecache, drupal, thumbnail, regenerate, image...
wp-drupal-imagecache/bootstrap.php 92% from 13 tests
This is the main PHP file of "Thumbnails like in Drupal" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("wp-drupal-imagecache.php" instead of "bootstrap.php")
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
Good job! No executable or dangerous file extensions detected3,000 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 403 | 654 | 2,488 |
PO File | 1 | 143 | 182 | 376 |
CSS | 1 | 30 | 0 | 136 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 44.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 91.00 |
Average method complexity | 3.82 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 89 | |
▷ Static methods | 44 | 49.44% |
▷ Public methods | 83 | 93.26% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 6.74% |
Functions | 5 | |
▷ Named functions | 2 | 40.00% |
▷ Anonymous functions | 3 | 60.00% |
Constants | 5 | |
▷ Global constants | 2 | 40.00% |
▷ Class constants | 3 | 60.00% |
▷ Public constants | 3 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
static/images/sample.png | 164.17KB | 79.46KB | ▼ 51.60% |