Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.08MB] [CPU: ▼6.32ms] Passed 4 tests
Analyzing server-side resources used by Enable Media Replace
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 43.88 ▼4.46 |
Dashboard /wp-admin | 3.36 ▲0.06 | 44.93 ▼21.65 |
Posts /wp-admin/edit.php | 3.48 ▲0.12 | 49.41 ▲2.85 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.08 | 93.54 ▼2.00 |
Media Library /wp-admin/upload.php | 3.37 ▲0.14 | 245.59 ▲210.20 |
Replace media /wp-admin/upload.php?page=enable-media-replace/enable-media-replace.php | 3.24 | 35.68 |
Server storage [IO: ▲0.71MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 111 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
EnableMediaReplace-notices |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Enable Media Replace
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 14.48 ▼0.08 | 2.20 ▼0.08 | 55.01 ▲4.56 |
Dashboard /wp-admin | 2,203 ▲15 | 5.79 ▲0.92 | 98.12 ▼22.96 | 44.26 ▲1.10 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.99 ▼0.02 | 58.04 ▲15.10 | 36.55 ▼0.53 |
Add New Post /wp-admin/post-new.php | 1,542 ▲18 | 18.50 ▼4.63 | 628.20 ▼45.60 | 58.02 ▼28.31 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.17 ▼0.09 | 114.93 ▲10.42 | 50.76 ▲4.61 |
Replace media /wp-admin/upload.php?page=enable-media-replace/enable-media-replace.php | 654 | 1.14 | 6.80 | 19.19 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
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
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 5× 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/enable-media-replace/classes/external/upsell_installer.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function EnableMediaReplace\\apply_filters() in wp-content/plugins/enable-media-replace/views/upsell.php:8
- > PHP Fatal error
Uncaught Error: Class 'WP_Upgrader_Skin' not found in wp-content/plugins/enable-media-replace/classes/external/upgrader_skin.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function EnableMediaReplace\\add_action() in wp-content/plugins/enable-media-replace/classes/ajax.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function EnableMediaReplace\\ShortPixelLogger\\wp_enqueue_script() in wp-content/plugins/enable-media-replace/build/shortpixel/log/src/view-debug-box.php:4
- > 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)
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
- Tags: You are using too many tags: 11 tag instead of maximum 10
enable-media-replace/enable-media-replace.php Passed 13 tests
Analyzing the main PHP file in "Enable Media Replace" version 4.1.4
112 characters long description:
Enable replacing media files by uploading a new file in the "Edit Media" section of the WordPress Media Library.
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
Everything looks great! No dangerous files found in this plugin12,440 lines of code in 82 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 46 | 1,723 | 968 | 6,236 |
CSS | 5 | 458 | 20 | 1,987 |
SVG | 3 | 3 | 3 | 1,650 |
Sass | 6 | 81 | 15 | 1,112 |
PO File | 12 | 249 | 294 | 755 |
JavaScript | 4 | 93 | 32 | 504 |
Markdown | 1 | 42 | 0 | 111 |
JSON | 5 | 1 | 0 | 85 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 27.79 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 90.00 |
Average method complexity | 3.52 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 28.00 |
Code structure | ||
---|---|---|
Namespaces | 12 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 33 | |
▷ Abstract classes | 1 | 3.03% |
▷ Concrete classes | 32 | 96.97% |
▷ Final classes | 2 | 6.25% |
Methods | 350 | |
▷ Static methods | 38 | 10.86% |
▷ Public methods | 261 | 74.57% |
▷ Protected methods | 56 | 16.00% |
▷ Private methods | 33 | 9.43% |
Functions | 17 | |
▷ Named functions | 13 | 76.47% |
▷ Anonymous functions | 4 | 23.53% |
Constants | 44 | |
▷ Global constants | 4 | 9.09% |
▷ Class constants | 40 | 90.91% |
▷ Public constants | 40 | 100.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
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/ui-icons_555555_256x240.png | 6.82KB | 4.17KB | ▼ 38.82% |
img/notices/slider.png | 4.63KB | 2.34KB | ▼ 49.41% |
img/notices/robo-cool.png | 5.51KB | 2.65KB | ▼ 51.83% |
img/notices/robo-scared.png | 6.42KB | 2.21KB | ▼ 65.62% |
img/ui-icons_444444_256x240.png | 6.83KB | 4.17KB | ▼ 38.86% |