PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.6.0
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.6.0
1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / src / Admin / Surveys / SatisfactionSurvey.php
hostinger-reach / src / Admin / Surveys Last commit date
SatisfactionSurvey.php 8 months ago Survey.php 8 months ago
SatisfactionSurvey.php
62 lines
1 <?php
2
3 namespace Hostinger\Reach\Admin\Surveys;
4
5 use Hostinger\Reach\Api\ApiKeyManager;
6 use Hostinger\Reach\Functions;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 die;
10 }
11
12 class SatisfactionSurvey extends Survey {
13 protected function should_load_survey(): bool {
14 if ( ! parent::should_load_survey() ) {
15 return false;
16 }
17
18 return $this->is_hostinger_page() && ( $this->has_any_user_action() || $this->has_been_five_days_since_connection() );
19 }
20
21 protected function get_score_question(): string {
22 return __( 'How would you rate your experience with Hostinger Reach so far?', 'hostinger-reach' );
23 }
24
25 protected function get_comment_question(): string {
26 return __( 'Any ideas or feedback to help us improve Hostinger Reach?', 'hostinger-reach' );
27 }
28
29 protected function get_id(): string {
30 return 'hostinger_reach_survey_satisfaction';
31 }
32
33 protected function get_location(): string {
34 return 'wordpress_hostinger_reach';
35 }
36
37 protected function has_any_user_action(): bool {
38 return get_option( Functions::HOSTINGER_REACH_HAS_USER_ACTION, false );
39 }
40
41 protected function has_been_five_days_since_connection(): bool {
42 $connection_time = get_option( ApiKeyManager::API_CONNECTION_TIME_NAME, null );
43 if ( is_null( $connection_time ) ) {
44 return false;
45 }
46
47 return ( time() - $connection_time ) >= ( 5 * self::DAY_IN_SECONDS );
48 }
49
50 protected function is_hostinger_page(): bool {
51 return str_contains( $_SERVER['REQUEST_URI'], 'hostinger' );
52 }
53
54 protected function get_review_url(): string {
55 return 'https://wordpress.org/support/plugin/hostinger-reach/reviews/#new-post';
56 }
57
58 protected function get_review_min_required_score(): int {
59 return 7;
60 }
61 }
62