90% c-purge-cache

Code Review | Purge Cache

WordPress plugin Purge Cache scored90%from 54 tests.

About plugin

  • Plugin page: c-purge-cache
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2022
  • Latest release: Oct 10, 2023
  • Number of updates: 9
  • Update frequency: every 52.9 days
  • Top authors: bebjakub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,077 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▲0.00ms] Passed 4 tests

This is a short check of server-side resources used by Purge Cache
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.44 ▼5.33
Dashboard /wp-admin3.40 ▲0.1057.03 ▲1.83
Posts /wp-admin/edit.php3.51 ▲0.1657.06 ▲1.33
Add New Post /wp-admin/post-new.php5.96 ▲0.08105.34 ▲10.82
Media Library /wp-admin/upload.php3.30 ▲0.0738.11 ▲2.18
Cloudflare Purge Cache /wp-admin/options-general.php?page=c-purge-cache3.3039.89

Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 9 new options
New WordPress options
c_purge_cache_post_update_settings
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
c_purge_cache_purge_settings
widget_theysaidso_widget
c_purge_cache_default_settings
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Purge Cache
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲21814.92 ▲0.551.79 ▲0.0643.81 ▼2.05
Dashboard /wp-admin2,367 ▲1796.58 ▲0.70135.89 ▲20.2142.99 ▼0.24
Posts /wp-admin/edit.php2,279 ▲1903.64 ▲1.6459.86 ▲21.9334.43 ▼3.56
Add New Post /wp-admin/post-new.php1,535 ▼723.24 ▲5.20611.84 ▼39.3633.91 ▼21.11
Media Library /wp-admin/upload.php1,409 ▲184.32 ▲0.1182.74 ▼20.1841.83 ▼0.93
Cloudflare Purge Cache /wp-admin/options-general.php?page=c-purge-cache1,2123.4250.6027.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • c_purge_cache_default_settings
    • widget_recent-comments
    • c_purge_cache_post_update_settings
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • c_purge_cache_purge_settings

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: cache, purge, cloudflare

c-purge-cache/c-purge-cache.php Passed 13 tests

Analyzing the main PHP file in "Purge Cache" version 1.0.8
100 characters long description:
Purge Cloudflare Cache of the Post with additional URLs on the Post update, Purge Everything button.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,535 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP173878081,530
JSON1005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity20.64
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods96
▷ Static methods2728.12%
▷ Public methods8689.58%
▷ Protected methods00.00%
▷ Private methods1010.42%
Functions15
▷ Named functions00.00%
▷ Anonymous functions15100.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin