wp_ prefix changed. What is the way to change so any prefix is understood?

The prefix refers only to the database tables prefix, other uses of the wp_ prefix in function, class, variable, (array) index or (class) property names are entirely unaffected and remain as wp_.

As such, so long as all plug-ins (and themes) you use avoid using SQL statements with a hardcoded wp_ prefix (and, as you point out, use $wpdb->prefix) you will be fine.

It’s impossible to comment on what PHPStorm is flagging up, but it will be entirely unrelated to the change of table prefix.

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