public function sendNotificationIfUpdatesAvailable()
    {
        $pluginsHavingUpdate = $this->getPluginsHavingUpdate();

        if (empty($pluginsHavingUpdate)) {
            return;
        }

        $pluginsToBeNotified = array();

        foreach ($pluginsHavingUpdate as $plugin) {
            if ($this->hasNotificationAlreadyReceived($plugin)) {
                continue;
            }

            $this->setHasLatestUpdateNotificationReceived($plugin);

            $pluginsToBeNotified[] = $plugin;
        }

        if (!empty($pluginsToBeNotified)) {
            $this->sendNotifications($pluginsToBeNotified);
        }
    }