Closed Rarst closed 9 years ago
Looking through the downloads folder and trash:
google-analytics-premium-1.1.8.zip
facetwp-1.8.6.zip
searchwp-term-highlight-1.8.7.zip
wpseo.zip
(http://wpseo.de/, no version number unfortunately)ga-ecommerce-3.0.2.zip
gravityformsmailchimp_3.2.zip
gravityforms_1.8.22.zip
Quite normal so far.
Actually the example I gave in #4 wasn't a real world example. This is:
contact-form-7.4.1.zip
Other stuff, pretty normal:
searchwp-2.4.9.zip
sitepress-multilingual-cms.3.1.8.4.zip
wpml-translation-management.1.9.9.zip
Thanks, folks! So far CF7 really putting a dent into it with that digit in name thing...
Quickly went through the most popular plugins on wp.org to find some edge cases:
nextgen-facebook.7.7.5.1.zip
p3-profiler.1.5.3.6.zip
wp-retina-2x.2.4.0.zip
wp-lightbox-2.zip
So by now we have
I am concerned about actual commercial plugins. WP org repo is automated (devs have no control about filename format) and WPackagist's problem :)
Sure. But still finding all those edge cases after 5 minutes probably makes it reasonable to assume that all this kind of crap will also be caught in the wild for commercial plugins.
I guess, adding... (headache, I am slow today again)
Ok, this handles everything we collected so far, except names ending in numbers. Which is really too ambiguous to handle.
I have found one that is not working fully. ninja-forms-mailchimp-v1.3.2.zip
is being returned as ninja-forms-mailchimp-v
Have added handling for optional v
prefix in version.
Also the collected filenames are now included and checked against in unit test.
At the moment the version regex is overly simplistic with regex (
|((?:\d+\.*){1,3})|
) matching sequence of 1 to 3 version–like parts (digit(s) with a dot).It needs to be more robust, but I do not want to force specific convention and renaming files on people. I want it to take wide (but reasonable) range of possibilities. See #4
I would like to collect example names from the wild for starters and iterate on regex from there.
If you provide or consume WP extensions in archives, please post example file names in this thread.
Collected examples
backupbuddy-4.1.2.2.zip
contact-form-7.4.1.zip
facetwp-1.8.6.zip
ga-ecommerce-3.0.2.zip
google-analytics-premium-1.1.8.zip
gravityforms_1.8.22.zip
gravityformsmailchimp_3.2.zip
mailchimp-for-wp-pro-2.5.5.zip
nextgen-facebook.7.7.5.1.zip
ninja-forms-mailchimp-v1.3.2.zip
p3-profiler.1.5.3.6.zip
searchwp-2.4.9.zip
searchwp-term-highlight-1.8.7.zip
sitepress-multilingual-cms.3.1.8.4.zip
wp-retina-2x.2.4.0.zip
wp-lightbox-2.zip
wpml-translation-management.1.9.9.zip
No version (poke authors?)
advanced-custom-fields-pro.zip
wpseo.zip