Toursan, there’s something with “Un cadeau acheté par un ami” that
neither of us at first saw. Clearly, the English translation
is a complete past tense sentence in the passive voice; however, if
the French is intended to be a sentence, it has an error. The
verb “acheté” is only used in the conjugation of acheter when the
auxilliary avoir is used, such as in one of the past tenses.
As you noted, the correct passé composé in the active voice is, “Un
ami a acheté un cadeau,” but I think the passive voice should be,
“Un cadeau a été acheter par un ami.” The latter because
after another verb, the second verb is in the infinitive. “Un
cadeau a été acheté par un ami” is incorrect because “acheté” is
only used after an auxilliary.
“Une fenêtre cassée par un enfant” may not be as straight forward
as it at first appears. Here “cassée” is an adjective
describing the window. The third person present singular
conjugation of “casser” is “casse”; in no tense of casser's
conjugation does cassée appear.
Finally, although at first glance the two examples appear to be
similar construction, in reality they aren’t.