Add Advanced Search Params
The search already accepts some extra params, like case sensitivity and lines of context. We should add an advanced search dropdown/extension to the search form which allows further customisation.
There are likely many useful options we could give, including limiting the search to a specific plugin/theme (props Micah Wood) or limiting matches to the first in each plugin/theme for identifying things like PHP (in)compatibility (props Micha Krapp).
If you anyone has more ideas for advanced search features I would love to hear about them. On the whole they seem likely to make searches faster and less resource intensive too, which makes them win/win.
Another suggestion has been to ignore matches inside comments (props Jonny Harris and Marius Jensen). I think we could do that for whole line comments easily, but mixed lines could be much more difficult. Certainly worth exploring.
Another suggestion is to limit searches to specific file type (.js, .php, etc). This seems useful and easy to implement.
Another suggestion is to be able to search just the open plugins or themes.
Thank you for the suggestion @joyously I agree completely and this is how wpdir I intended it to work but it turned out to be more difficult than expected.
Using plugins as an example, you can download the .zip for some closed plugins but get no API response, others you cannot download but get an API response. I have not yet been able to identify a reliable method for accurately identifying closed plugins.
As such the current system simply counts plugins/themes it can download (there is a .zip available for) as open, and all others as closed. If you have an idea how we could more accurately identify the status of plugins or themes I would love to hear.