phpcs error in WordPress

Yes it is correct. Escaping should be done based on context, and since wp_nonce_url() is used in an hrefas proper url, you should use esc_url.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)