Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼7.53ms] Passed 4 tests
Analyzing server-side resources used by Replace Image
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 39.67 ▼4.55 |
Dashboard /wp-admin | 3.35 ▲0.00 | 50.24 ▼17.66 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 50.67 ▼2.82 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 98.10 ▼5.07 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 43.01 ▲5.19 |
Replace Image /wp-admin/tools.php?page=hm_replace_image | 3.24 | 32.78 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
hm_replace_image_first_activate |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Replace Image
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,820 ▲34 | 14.29 ▼0.07 | 1.84 ▼0.23 | 44.93 ▼3.38 |
Dashboard /wp-admin | 2,204 ▲27 | 5.63 ▲0.01 | 91.15 ▼3.85 | 41.54 ▼5.32 |
Posts /wp-admin/edit.php | 2,106 ▲6 | 1.98 ▼0.02 | 40.36 ▲2.42 | 35.80 ▼2.12 |
Add New Post /wp-admin/post-new.php | 1,531 ▲3 | 23.21 ▲0.11 | 681.31 ▲9.53 | 59.62 ▲1.90 |
Media Library /wp-admin/upload.php | 1,403 ▼0 | 4.13 ▼0.07 | 110.01 ▼6.69 | 47.02 ▼0.77 |
Replace Image /wp-admin/tools.php?page=hm_replace_image | 930 | 3.44 | 91.38 | 33.06 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 7 options in the database
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- hm_replace_image_first_activate
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for 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
Please fix the following items
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/replace-image/hm-replace-image.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/replace-image/plugin-credit.php:10
- > PHP Notice
Undefined variable: potent_slug in wp-content/plugins/replace-image/plugin-credit.php on line 9
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: image, attachments, media, overwrite, images...
replace-image/hm-replace-image.php 92% from 13 tests
The entry point to "Replace Image" version 1.1.8 is a PHP file that has certain tags in its header comment area
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("replace-image.php" instead of "hm-replace-image.php")
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
Everything looks great! No dangerous files found in this plugin203 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 33 | 23 | 183 |
JavaScript | 1 | 7 | 5 | 20 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 13 | |
▷ Named functions | 13 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/ags-logo.png | 2.19KB | 1.17KB | ▼ 46.63% |
images/disable-cache-firefox.png | 27.29KB | 15.64KB | ▼ 42.70% |
images/disable-cache-chrome.png | 18.14KB | 8.58KB | ▼ 52.73% |