Modify php code from plugin

Given that there are no filters in the theme that you could manipulate, this is a bit tougher but you can alter the logout URL in general with the logout_url filter:

function hack_logout_url_wpse_193113($logout_url, $redirect) {
  $logout_url = parse_url($logout_url);
  if (!empty($logout_url['query'])) {
    parse_str(html_entity_decode($logout_url['query']),$qry_str);
    $qry_str['redirect_to'] = urlencode(home_url());
  }
  $logout_url['query'] = build_query($qry_str);
  $ret="";
  foreach ($logout_url as $k=>$v) {
    switch ($k) {
      case 'scheme':
        $ret .= $v.'://';
        break;
      case 'host':
      case 'query':
        $ret .= $v;
        break;
      default :
        $ret .= $v."https://wordpress.stackexchange.com/";
    }
  }
  return $ret;
}
add_filter('logout_url','hack_logout_url_wpse_193113',10,2);
echo wp_logout_url(get_permalink());