You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some checks to develop like Generic Names, Readme privacy and more.
What we need is to search for all functions used in a plugin, then analyze them and diagnose the problem.
We don't know how to approach this problem. What we see is that we show the error individually but we need to show globally.
For example in Generic Names, we have to look for functions/class/etc names and after analyze them for example in an array, and then show the problem.
So the check would be like:
Search Functions names > Make them in a list > Review and diagnose which are problematic > Make the error for each of them.
It's similar to the other Check related with privacy. We have to look al remotes calls, then see in the readme if the privacy notes are written, if not, warn to the user.
I thought the plugins team already had such a tool internally that does this for detecting the function prefix that is likely used.
Is that what you are trying to solve here? Or what are you trying to solve with such a tool?
Generally speaking you'll probably want to use RecursiveDirectoryIterator to get a list of all PHP files. Abstract_File_Check::get_files() already handles this. Then you need something like PHP-Parser to scan the PHP files for all functions to then analyze their names. I was just looking at https://github.com/johnbillion/wp-compat/blob/c86aa3c71b560817689723f41bd551f5c10e2a22/generate.php today which does something like that.
Once you have your function names you can do whatever you want with them.
We have some checks to develop like Generic Names, Readme privacy and more.
What we need is to search for all functions used in a plugin, then analyze them and diagnose the problem.
We don't know how to approach this problem. What we see is that we show the error individually but we need to show globally.
For example in Generic Names, we have to look for functions/class/etc names and after analyze them for example in an array, and then show the problem.
So the check would be like:
Search Functions names > Make them in a list > Review and diagnose which are problematic > Make the error for each of them.
It's similar to the other Check related with privacy. We have to look al remotes calls, then see in the readme if the privacy notes are written, if not, warn to the user.
What do you think?
CC: @mukeshpanchal27 @felixarntz @swissspidy
The text was updated successfully, but these errors were encountered: