public function create_reporter(array $properties)
{
$properties = Model_Helper::prepare_properties($this->get_settings('reporter_properties'), $properties);
$reporter_class = $properties['class_name'] ? $properties['class_name'] : $this->get_reporter_class($properties['name']);
$reporter_class = $this->get_settings('namespaces.classes_namespace') . '\\' . $reporter_class;
$reporter = new $reporter_class($properties);
if (!$reporter instanceof Base_Reporter) {
return new \WP_Error('Each reporter must to be an instance or sub-instance of Base_Reporter class');
}
if (!$reporter->is_enabled()) {
return false;
}
return $reporter;
}