WPTT / theme-sniffer

Theme Sniffer plugin using sniffs.
MIT License
270 stars 3 forks source link

new feature: validate screenshot.png #122

Closed timelsass closed 5 years ago

timelsass commented 5 years ago

This adds validation on screenshot.png for valid mime type and dimensions from https://developer.wordpress.org/themes/release/required-theme-files/

This was built off the changes for required files checks.

Testing: 1 delete a theme's screenshot.png - run themesniffer

2 add a large .png over the 1200x900 size restraint - run themesniffer

3 add a screenshot.png file that would allow $mime_type to be false (either errors thrown when doing getimagesize, exif_imagetype, or invalid image mime type example: make a file called screenshot.png in cli ) - run themesniffer