90% purge-cache-for-cloudflare

Code Review | Purge Cache for CloudFlare

WordPress plugin Purge Cache for CloudFlare scored90%from 54 tests.

About plugin

  • Plugin page: purge-cache-for-c...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.5.1
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: May 6, 2016
  • Number of updates: 7
  • Update frequency: every 28.3 days
  • Top authors: dimadin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,881 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▲0.44ms] Passed 4 tests

An overview of server-side resources used by Purge Cache for CloudFlare
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1842.88 ▲1.89
Dashboard /wp-admin3.59 ▲0.2951.75 ▲0.84
Posts /wp-admin/edit.php3.64 ▲0.2950.16 ▲3.22
Add New Post /wp-admin/post-new.php6.02 ▲0.1490.12 ▼0.93
Media Library /wp-admin/upload.php3.56 ▲0.3337.76 ▼0.03
CloudFlare Purge All /wp-admin/options.php?page=cloudflare-purge-all3.4137.30

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Purge Cache for CloudFlare
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.351.64 ▼0.1441.36 ▲0.02
Dashboard /wp-admin2,192 ▲185.54 ▼0.1387.22 ▼3.0242.15 ▲2.52
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0541.06 ▲4.1634.64 ▼5.38
Add New Post /wp-admin/post-new.php1,526 ▼1123.24 ▲4.94622.87 ▼12.8184.33 ▼0.73
Media Library /wp-admin/upload.php1,397 ▼34.18 ▲0.04100.62 ▼5.0341.96 ▲0.31
CloudFlare Purge All /wp-admin/options.php?page=cloudflare-purge-all7622.0224.0821.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: page cache, cache, cloudflare

purge-cache-for-cloudflare/purge-cache-for-cloudflare.php 92% from 13 tests

"Purge Cache for CloudFlare" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected623 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4227934623

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity27.67
▷ Minimum class complexity8.00
▷ Maximum class complexity41.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods46
▷ Static methods1226.09%
▷ Public methods4597.83%
▷ Protected methods12.17%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected