Opened 11 years ago
Closed 11 years ago
#26036 closed defect (bug) (fixed)
Remove unused images
Reported by: | helen | Owned by: | helen |
---|---|---|---|
Milestone: | 3.8 | Priority: | low |
Severity: | normal | Version: | |
Component: | Graphic Design | Keywords: | |
Focuses: | Cc: |
Description
Hooray, Dashicons. Previously: #20980
Attachments (2)
Change History (15)
#2
@
11 years ago
Let's figure out which of these may need to be kept for plugin use... Icons and pure design elements don't matter much if they disappear even if used, but things used for actions might need to stay. For example, spinners, xit, maybe stars, sort, resize, etc.
#3
@
11 years ago
A lot are calling wp-includes/images/rss.png more than anything, but we're still using that... Also smilies.
Running this on my slurper (includes-images.txt is the list above):
$ while read a ; do ack --php --group "$a" ./plugins >> includes.txt; done < includes-images.txt
It'll be a while. O.O I'm going to strip out all the ones that are for 'security scans'
#4
@
11 years ago
Good gravy. I ended up running this:
grep -rIEf includes-images.txt ./plugins > includes-grep.txt
And I've uploaded two files. One is the pure grep, and the other is when I clean it up and remove all the 'security' plugins. This is all files, except actual images.
#5
@
11 years ago
I don't really have a lot of sympathy for plugins that are doing a wild guessing game with ../../../../../../../wp-(admin|includes)/images/
. Also, as discussed with markjaquith previously: http://core.trac.wordpress.org/ticket/20980#comment:5
There are some that are probably keepers for now, as nacin mentioned - xit and spinner are what come to my mind.
#6
@
11 years ago
Plugins like baw-better-admin-color-themes are just going to break anyway in 3.8 because of MP6ification, so ...
PLUGIN TYPE | COUNT |
uses an image | 116 |
edits admin | 9 |
breaking plugin repo rules | 10 |
The ones that edit admin are the ones that need an overhaul anyway, so I don't really give a durn about them. The security plugins I don't even bother with since, hullo, they'll cope. They have to update every new release anyway. The breaking rules are calling an image from their servers, I'll apply a hammer in a bit.
116 plugins out of 28,000 is ... what .03%?
Actually I think spinner's fine to toss. Only showed up five times. o.O
IMAGE | COUNT |
xit* | 105 |
spinner | 5 |
menu.png | 29 |
arrows* | 151 |
media-* | 241 |
Mind, xit almost triples when we count the themeing admin plugins and the scanners.
#7
@
11 years ago
Hello everyone
"baw-better-admin-color-themes" is my plugin, it was not designed to be functionnal on 3.8. We can clearly remove it, no problem.
Long life to MP6 ;)
Have a nice day
#9
@
11 years ago
I would like to remove the following for 3.8, and remove the rest of that list in 3.9 to give people a chance to catch up. The only one I don't think we can remove from that list is wp-includes/images/rss-2x.png
. The ones I took off the list were things like action indicators and our former-style icons for the pointers, menu, toolbar, and TinyMCE. Ipstenu's list doesn't show a ton of use of those icons, but I'd like to play it safe since this was such a short cycle.
wp-admin/images/arrows-dark-2x.png wp-admin/images/arrows-dark-vs-2x.png wp-admin/images/arrows-dark-vs.png wp-admin/images/arrows-dark.png wp-admin/images/arrows-pr-2x.png wp-admin/images/arrows-pr.png wp-admin/images/arrows-vs-2x.png wp-admin/images/arrows-vs.png wp-admin/images/arrows.png wp-admin/images/bubble_bg-2x.gif wp-admin/images/bubble_bg-rtl-2x.gif wp-admin/images/bubble_bg-rtl.gif wp-admin/images/bubble_bg.gif wp-admin/images/comment-grey-bubble-2x.png wp-admin/images/comment-grey-bubble.png wp-admin/images/date-button-2x.gif wp-admin/images/date-button.gif wp-admin/images/generic.png wp-admin/images/menu-shadow-rtl.png wp-admin/images/menu-shadow.png wp-admin/images/press-this-2x.png wp-admin/images/press-this.png wp-admin/images/stars-rtl-2x.png wp-admin/images/stars-rtl.png wp-admin/images/welcome-icons-2x.png wp-admin/images/welcome-icons.png wp-admin/images/wordpress-logo-2x.png wp-admin/images/wp-badge-2x.png wp-admin/images/wp-badge.png wp-admin/images/wp-logo-2x.png wp-admin/images/wp-logo-vs-2x.png wp-admin/images/wp-logo-vs.png wp-admin/images/wp-logo.png wp-includes/images/wpmini-blue-2x.png wp-includes/images/wpmini-blue.png
#10
@
11 years ago
Based on @helen's latest list of proposed images for removal, I ran a scan of the plugins repository for image use.
My search method differs from @Ipstenu's in that I initially checked for the "images/$image.ext" name (omittingwp-admin
and wp-includes
from the path). That way I could pick up usages such as:
admin_url('images/image.png')
admin_url() . 'images/image.png'
includes_url('images/image.png')
includes_url() . 'images/image.png'
site_url() . WPINC . '/images/image.png'
- Admin-relative links when the context is within the admin (e.g. "../images/image.png")
- And of course the full site relative path as used in the list
Files checked were *.(php|css|js|less).
I excluded:
- The following plugins (security and admin theming plugins that have matches but will have to update anyhow): baw-better-admin-color-themes, easy-admin-color-schemes, exploit-scanner, foundation-verify-install, jw-cloud-sites-wp-scanner, total-security, ultimate-security-checker
- Repository violators referencing these images on some external site
- Plugins packaging the image(s) and merely referencing their own copy
The table below summarizes the results, with each image name, the number of times it is used overall (including multiple uses by one plugin) and a count of the number of unique plugins utilizing the image.
Image file | # Uses | # Plugins |
---|---|---|
wp-admin/images/arrows-dark-2x.png | 2 | 2 |
wp-admin/images/arrows-dark-vs-2x.png | 0 | 0 |
wp-admin/images/arrows-dark-vs.png | 3 | 2 |
wp-admin/images/arrows-dark.png | 12 | 8 |
wp-admin/images/arrows-pr-2x.png | 0 | 0 |
wp-admin/images/arrows-pr.png | 0 | 0 |
wp-admin/images/arrows-vs-2x.png | 0 | 0 |
wp-admin/images/arrows-vs.png | 0 | 0 |
wp-admin/images/arrows.png | 81 | 46 |
wp-admin/images/bubble_bg-2x.gif | 1 | 1 |
wp-admin/images/bubble_bg-rtl-2x.gif | 0 | 0 |
wp-admin/images/bubble_bg-rtl.gif | 1 | 1 |
wp-admin/images/bubble_bg.gif | 28 | 10 |
wp-admin/images/comment-grey-bubble-2x.png | 1 | 1 |
wp-admin/images/comment-grey-bubble.png | 52 | 34 |
wp-admin/images/date-button-2x.gif | 2 | 2 |
wp-admin/images/date-button.gif | 26 | 20 |
wp-admin/images/generic.png | 21 | 12 |
wp-admin/images/menu-shadow-rtl.png | 2 | 2 |
wp-admin/images/menu-shadow.png | 5 | 4 |
wp-admin/images/press-this-2x.png | 1 | 1 |
wp-admin/images/press-this.png | 5 | 5 |
wp-admin/images/stars-rtl-2x.png | 0 | 0 |
wp-admin/images/stars-rtl.png | 0 | 0 |
wp-admin/images/welcome-icons-2x.png | 1 | 1 |
wp-admin/images/welcome-icons.png | 0 | 0 |
wp-admin/images/wordpress-logo-2x.png | 4 | 4 |
wp-admin/images/wp-badge-2x.png | 2 | 2 |
wp-admin/images/wp-badge.png | 4 | 4 |
wp-admin/images/wp-logo-2x.png | 1 | 1 |
wp-admin/images/wp-logo-vs-2x.png | 0 | 0 |
wp-admin/images/wp-logo-vs.png | 2 | 2 |
wp-admin/images/wp-logo.png | 9 | 8 |
wp-includes/images/wpmini-blue-2x.png | 1 | 1 |
wp-includes/images/wpmini-blue.png | 6 | 5 |
Total number of affected plugins: 130
The above stats may include a few plugins that are currently closed. I'll update the list once I run a check for that.
Unused images are:
Powered by https://gist.github.com/ocean90/3276105