Indeed, though some general principles often remain applicable across tables and game types. D&D, is strongly offense slanted, so efficiency of any non-permanent resources(like wealth to some extent, health and spell slots, but not actions, unless in combat) is secondary by far to peak output, so long as you don't run out entirely.
Time value is another, variable matter. If you're in a level 1-5 game sure weapon focus can be entirely worthwhile(assuming you didn't need the slot for something specific). A trap at low levels is not necessarily one at high, and vice versa.
You can for example, make use of the random sample test to identify what options are baseline terrible(before synergistic effects or multiplier investments, which take more experience to learn), simply by examining a random sampling of the options available for the same cost, and contrasting benefits. Effects involving synergy should be measured by aggregating the combined cost before comparisons. Skills here actually do fairly well, their costs are generally low, and their benefits are persistent, which is priceless for passive abilities and abilities for which the need cannot be easily anticipated. Stealth, Sense Motive, Knowledge and Perception are example of these, since you require them over an extended period(making magical options rather impractical to set up over the early to mid game, while magic foils magic at late game) or use them against unanticipated situations