Skip to content

Conversation

@manishminio
Copy link

Summary

This PR adds the ability for users to download Plugin Check scan results as PDF or CSV files directly from the results page.
The export feature helps developers and site owners store, share, and review scan reports outside the WordPress admin.

Key Features Added

  1. PDF Export - Generates a clean, printable PDF version of the scan report, which includes Report title, Timestamp, and Table of issues with severity, file, line, and message.
  2. CSV Export - Produces a UTF-8 CSV file compatible with Excel, Google Sheets, etc.
  3. UI Enhancements - Added a “Download Report” dropdown button in the results screen.
  4. New Export Handler - Added new class: includes/Admin/Report_Exporter.php
    This class Prepares scan result data, Handles export logic for both PDF and CSV, Performs capability checks, Validates nonces, Sends proper content headers
  5. Hooks & Endpoints

Security

  • Export actions protected via: Nonces, current_user_can( 'manage_options' ) capability checks, and Sanitization and escaping of parameters

Testing Done

  • Verified PDF downloads correctly with valid formatting.
  • Verified CSV downloads and opens in spreadsheet tools.
  • Checked nonce expiration behavior.
  • Ensured PHPCS compliance with WordPress coding standards.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @[email protected].

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: [email protected].

Co-authored-by: davidperezgar <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@davidperezgar
Copy link
Member

Hello, There is already a PR merged with similar functionality.
#1098

@davidperezgar
Copy link
Member

davidperezgar commented Nov 28, 2025

Hello @manishminio ?

@davidperezgar
Copy link
Member

This PR has been closed as we didn't receive any comments regarding the functionality that has already been developed and is planned for version 1.8.0.

@manishminio
Copy link
Author

Hey @davidperezgar! No worries, thank you for the update :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants