Is it a great idea to upload php instead of writing phps in drupal interface At each time I write PHP code in blocks and views, I always think about this question : "What are the downsides of using 'custom' PHP code in blocks, nodes, views-args, etc?".

Is it a great idea to make users able to send php files instead of writting it. It would be a first step to manage the code after with name conventions to find the code easily and to be also able to read easily the code?

Or it's just a stupid idea that will generate a security mess ??
I think the solution is to put PHP codes in hooks... And anyone could say that it's insane to create a module just for one or two lines of codes... But most of time, drupal users has to do somthing like this several times in drupal. So why not combine all these hooks in one module that we might call whatever we want. So then just well-comment the code for good reading.

The little snag is : is there hook for each actions where we can add php code ?