protected function isValidArchive()
    {
        $isValid = false;
        $zip = new ZipArchive();
        //check the archive opening and the consistency
        if ($zip->open($this->getExtractedSource(), ZIPARCHIVE::CHECKCONS) !== false) {
            //check if the manifest is there
            if ($zip->locateName("index.html") !== false) {
                $isValid = true;
            } else {
                $this->addError(__("An Open Web Item package must contain an index.html file at the root of the archive."));
            }
        } else {
            $this->addError(__("The ZIP archive containing the Open Web Item could not be open."));
        }

        return $isValid;
    }