The wires actually look good to the transformer. Looks like (from hundreds of miles away) this connection in this spot arced and failed:
Looks like the smoke released from the connections, not the transformer.
If you want to test the transformer, you should get a 'continuity' reading for each individual coil to see if it burned open. Disconnect all the wires, with an ohmmeter there should be able to get a measurement at each coil (greater than infinity). X1 & X2, X3 & X4, H1 & H2, H3 & H4. The 2 X coils should read about the same, as should the 2 H coils.