The rectifying properties of α,ω-dithiol terminated oligo(phenylene ethynylene) molecules sandwiched between heterometallic electrodes, including the molecular length and side group effects, are theoretically investigated using the fully self-consistent nonequilibrium Green's function method combined with density functional theory. The results show nonlinear variation with changes in molecule length: when the molecule becomes longer, the current decreases at first and then increases while the rectification shifts in the opposite direction. This stems from the change in molecular eigenstates and the coupling between the molecule and electrodes caused by different molecular lengths. The rectifying behavior of heterometallic molecular junctions can be attributed to the asymmetric molecule-electrode contacts, which lead to asymmetric electronic tunneling spectra, molecular eigenvalues, molecular orbitals, and potential drop at reversed equivalent bias voltages. Our results provide a fundamental understanding of the rectification of heterometallic molecular junction, and a prediction of rectifiers with different rectification properties from those in the experiment, using electrodes with reduced sizes.