Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼9.12ms] Passed 4 tests
This is a short check of server-side resources used by Remove Extra Media
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 39.83 ▼1.35 |
Dashboard /wp-admin | 3.33 ▼0.01 | 46.52 ▼18.75 |
Posts /wp-admin/edit.php | 3.48 ▲0.12 | 56.70 ▲13.22 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 86.65 ▼17.66 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 37.04 ▲1.30 |
Remove Extra Media /wp-admin/options-general.php?page=remove-extra-media-settings | 3.24 | 34.08 |
Remove Extra Media Processer /wp-admin/tools.php?page=remove-extra-media | 3.23 | 33.16 |
Server storage [IO: ▲0.79MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
remove-extra-media-settings |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Remove Extra Media
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,823 ▲77 | 13.20 ▼1.21 | 1.86 ▼0.03 | 47.35 ▲3.36 |
Dashboard /wp-admin | 2,229 ▲26 | 5.79 ▼0.02 | 101.33 ▼18.75 | 38.97 ▼4.91 |
Posts /wp-admin/edit.php | 2,108 ▲8 | 2.04 ▲0.03 | 40.65 ▲0.93 | 35.58 ▼2.97 |
Add New Post /wp-admin/post-new.php | 1,556 ▲30 | 23.20 ▲5.55 | 656.01 ▲60.49 | 62.21 ▲4.58 |
Media Library /wp-admin/upload.php | 1,405 ▲5 | 4.26 ▲0.02 | 100.35 ▼0.80 | 49.91 ▲6.36 |
Remove Extra Media /wp-admin/options-general.php?page=remove-extra-media-settings | 1,127 | 2.01 | 45.38 | 57.91 |
Remove Extra Media Processer /wp-admin/tools.php?page=remove-extra-media | 843 | 1.80 | 27.33 | 29.76 |
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
You still need to fix the following
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- remove-extra-media-settings
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=remove-extra-media-settings
- > User deprecated in wp-includes/functions.php+5453
Function wp_htmledit_pre is deprecated since version 4.3.0! Use format_for_editor() instead.
- > GET request to /wp-admin/options-general.php?page=remove-extra-media-settings
- > Deprecated in wp-content/plugins/remove-extra-media/lib/class-remove-extra-media-settings.php+408
Non-static method Remove_Extra_Media_Settings::display_about() should not be called statically
SRP 50% from 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
Almost there! Just fix the following items
- 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/remove-extra-media/ci/tests/bootstrap.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/remove-extra-media/ci/tests/class.sample-test.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/remove-extra-media/remove-extra-media.php:560
- > PHP Warning
require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/remove-extra-media/ci/tests/bootstrap.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
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: remove, posts, media
remove-extra-media/remove-extra-media.php Passed 13 tests
The principal PHP file in "Remove Extra Media" v. 1.1.1 is loaded by WordPress automatically on each request
87 characters long description:
Use Remove Extra Media to remove extra media attachments from your selected post types.
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
There were no executable files found in this plugin2,504 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 416 | 210 | 1,244 |
CSS | 2 | 20 | 34 | 450 |
PO File | 2 | 128 | 146 | 441 |
Markdown | 5 | 55 | 0 | 108 |
JavaScript | 1 | 27 | 20 | 98 |
Bourne Shell | 2 | 22 | 4 | 86 |
XML | 3 | 11 | 5 | 77 |
PHP code Passed 2 tests
Analyzing 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.39 |
Average class complexity | 40.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 111.00 |
Average method complexity | 3.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 28.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 61 | |
▷ Static methods | 48 | 78.69% |
▷ Public methods | 61 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 4 | 100.00% |
▷ Public constants | 4 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.60MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png | 0.33KB | 0.16KB | ▼ 52.38% |
css/redmond/images/ui-bg_flat_55_fbec88_40x100.png | 0.20KB | 0.08KB | ▼ 57.77% |
css/redmond/images/ui-icons_2e83ff_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
css/redmond/images/ui-icons_f9bd01_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png | 0.29KB | 0.10KB | ▼ 65.41% |