We would say the following elements are critical to secure coding, based on our study of credible secure coding standards, such as OWSAP and SEI CERT:
Input Validation
Access Control
Authentication and Password Management
Threat Modeling
Data Protection
Cryptographic Practices
Error Handling and Logging
Keeping it simple
For more information on each of these, please refer to our article on secure coding.