Suppose R is a local ring with invariants p,n,r,m,k and mr=4, that is R of order p4. Then, R=R0+uR0+vR0+wR0 has maximal ideal J=uR0+vR0+wR0 of order p(m−1)r and a residue field F of order pr, where R0=GR(pn,r) is the coefficient subring of R. In this article, the goal is to improve the understanding of linear codes over small-order non-chain rings. In particular, we produce the MacWilliams formulas and generator matrices for linear codes of length N over R. In order to accomplish that, we first list all such rings up to isomorphism for different values of p,n,r,m,k. Furthermore, we fully describe the lattice of ideals in R and their orders. Next, for linear codes C over R, we compute the generator matrices and MacWilliams identities, as shown by numerical examples. Given that non-chain rings are not principal ideals rings, it is crucial to acknowledge the difficulties that arise while studying linear codes over them.