Fatal error: Uncaught Error: Call to undefined function

In your code there’s this part:

test();
ob_start();
wp_list_categories($atts);
$output = ob_get_contents();  

But I really doubt that global function called test exists on your page.

There is a function called test in your class, but it’s not static (so you can’t call it from static context unless you change it to static function test(){...}), and you should call it with self::test();

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