Skip to content

Plugin Check Stats

Plugin Check Stats #17

name: Plugin Check Stats
on:
schedule:
- cron: '0 12 * * 0'
workflow_dispatch:
permissions: {}
jobs:
plugin-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
plugin_slug:
- advanced-custom-fields
- custom-post-type-ui
- meta-box
- cmb2
- pods
- secure-custom-fields
- smart-custom-fields
- simple-tags
- custom-field-template
- wck-custom-fields-and-custom-post-types-creator
- post-types-unlimited
- cubewp-framework
- custom-post-types
- simple-cpt
- easy-post-types-fields
- acpt-lite
steps:
- name: Download plugin from WordPress.org
run: |
curl --fail -L "https://downloads.wordpress.org/plugin/${{ matrix.plugin_slug }}.zip" -o plugin.zip
unzip plugin.zip
- name: Run Plugin Check
uses: WordPress/plugin-check-action@v1
continue-on-error: true
with:
build-dir: ./${{ matrix.plugin_slug }}
slug: ${{ matrix.plugin_slug }}
- name: POST results to API
env:
COMPAREWPORG_API_KEY: ${{ secrets.COMPAREWPORG_API_KEY }}
run: |
RESULTS_FILE="${{ runner.temp }}/plugin-check-results.txt"
if [ ! -f "$RESULTS_FILE" ]; then
echo "Results file not found, skipping POST."
exit 0
fi
TOTAL_ERRORS=$(grep -o '"type":"ERROR"' "$RESULTS_FILE" | wc -l | tr -d ' ')
TOTAL_WARNINGS=$(grep -o '"type":"WARNING"' "$RESULTS_FILE" | wc -l | tr -d ' ')
curl --fail-with-body -X POST \
-d "total_errors=$TOTAL_ERRORS" \
-d "total_warnings=$TOTAL_WARNINGS" \
"https://comparewp.org/plugin-check-api/${{ matrix.plugin_slug }}/?api_key=${{ env.COMPAREWPORG_API_KEY }}"