Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#26036 closed defect (bug) (fixed)

Remove unused images

Reported by: helen's profile helen Owned by: helen's profile helen
Milestone: 3.8 Priority: low
Severity: normal Version:
Component: Graphic Design Keywords:
Focuses: Cc:

Description

Hooray, Dashicons. Previously: #20980

Attachments (2)

includes-grep.txt (1.9 MB) - added by Ipstenu 11 years ago.
Grep results
includes-grep-clean.txt (1.4 MB) - added by Ipstenu 11 years ago.
Removed all 'security' plugins

Change History (15)

#1 @ocean90
11 years ago

Unused images are:

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/icons32-2x.png
wp-admin/images/icons32-vs-2x.png
wp-admin/images/icons32-vs.png
wp-admin/images/icons32.png
wp-admin/images/imgedit-icons-2x.png
wp-admin/images/imgedit-icons.png
wp-admin/images/list-2x.png
wp-admin/images/list.png
wp-admin/images/media-button-2x.png
wp-admin/images/media-button-music.gif
wp-admin/images/media-button-other.gif
wp-admin/images/media-button.png
wp-admin/images/menu-2x.png
wp-admin/images/menu-shadow-rtl.png
wp-admin/images/menu-shadow.png
wp-admin/images/menu-vs-2x.png
wp-admin/images/menu-vs.png
wp-admin/images/menu.png
wp-admin/images/post-formats-vs.png
wp-admin/images/post-formats.png
wp-admin/images/post-formats32-vs.png
wp-admin/images/post-formats32.png
wp-admin/images/press-this-2x.png
wp-admin/images/press-this.png
wp-admin/images/resize-rtl-2x.gif
wp-admin/images/resize-rtl.gif
wp-admin/images/sort-2x.gif
wp-admin/images/sort.gif
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-admin/images/xit-2x.gif
wp-admin/images/xit.gif
wp-includes/images/admin-bar-sprite-2x.png
wp-includes/images/admin-bar-sprite.png
wp-includes/images/arrow-pointer-blue-2x.png
wp-includes/images/arrow-pointer-blue.png
wp-includes/images/icon-pointer-flag-2x.png
wp-includes/images/icon-pointer-flag.png
wp-includes/images/rss-2x.png
wp-includes/images/wpicons-2x.png
wp-includes/images/wpicons.png
wp-includes/images/wpmini-blue-2x.png
wp-includes/images/wpmini-blue.png
wp-includes/images/wpspin.gif
wp-includes/images/xit-2x.gif
wp-includes/images/xit.gif

Powered by https://gist.github.com/ocean90/3276105

#2 @nacin
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 @Ipstenu
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'

@Ipstenu
11 years ago

Grep results

@Ipstenu
11 years ago

Removed all 'security' plugins

#4 @Ipstenu
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 @helen
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 @Ipstenu
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.

Last edited 11 years ago by Ipstenu (previous) (diff)

#7 @juliobox
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

#8 @samuelsidler
11 years ago

  • Priority changed from normal to low

#9 @helen
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 @coffee2code
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.

#11 @helen
11 years ago

Fine with allowing arrows.png, bubble_bg.gif, comment-grey-bubble.png, date-button.gif, and generic.png to live on for now.

#12 @helen
11 years ago

P.S. Thanks for running that, coffee2code. :)

#13 @helen
11 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to closed

In 26821:

Remove many of the now-unused images in core. Some images have been left for now, notably our previous style icons, action indicators, and images that see a higher frequency of use in plugins to allow them more time to adapt to the new design. props ocean90, Ipstenu, coffee2code. fixes #26036.

Note: See TracTickets for help on using tickets.