public function dontHaveAttachmentFilesInDatabase($attachmentIds)
    {
        $postmeta = $this->grabPostmetaTableName();

        foreach ((array)$attachmentIds as $attachmentId) {
            $attachedFile = $this->grabAttachmentAttachedFile($attachmentId);
            $attachmentMetadata = $this->grabAttachmentMetadata($attachmentId);

            $fs = $this->getWpFilesystemModule();
            $filesPath = Utils::untrailslashit($fs->getUploadsPath(dirname($attachedFile)));

            if (!isset($attachmentMetadata['sizes']) && is_array($attachmentMetadata['sizes'])) {
                continue;
            }

            foreach ($attachmentMetadata['sizes'] as $size => $sizeData) {
                $filePath = $filesPath . '/' . $sizeData['file'];
                $fs->deleteUploadedFile($filePath);
            }
            $fs->deleteUploadedFile($attachedFile);
        }
    }