84% purge-cloud-flare

Code Review | Purge Cloud Flare

WordPress plugin Purge Cloud Flare scored84%from 54 tests.

About plugin

  • Plugin page: purge-cloud-flare
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Jun 20, 2016
  • Latest release: Feb 22, 2017
  • Number of updates: 17
  • Update frequency: every 14.7 days
  • Top authors: webrangers (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,954 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.32ms] Passed 4 tests

Analyzing server-side resources used by Purge Cloud Flare
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0841.20 ▼3.96
Dashboard /wp-admin3.42 ▲0.0848.09 ▼3.48
Posts /wp-admin/edit.php3.54 ▲0.1453.61 ▲3.64
Add New Post /wp-admin/post-new.php6.03 ▲0.1092.90 ▼21.49
Media Library /wp-admin/upload.php3.35 ▲0.0839.90 ▲3.82

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
cf-purger
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Purge Cloud Flare: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲24213.85 ▼0.528.16 ▲6.6355.45 ▲13.48
Dashboard /wp-admin2,265 ▲905.70 ▲0.0483.48 ▼23.6676.11 ▲38.49
Posts /wp-admin/edit.php2,176 ▲732.03 ▲0.0638.73 ▲2.5239.49 ▲3.66
Add New Post /wp-admin/post-new.php1,598 ▲7222.86 ▼0.54609.34 ▼69.69156.72 ▲103.42
Media Library /wp-admin/upload.php1,473 ▲734.16 ▼0.04111.91 ▲12.0185.88 ▲43.32

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: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/purge-cloud-flare/purge-cloud-flare.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #6 (Purge individual files modal)
You can look at the official readme.txt

purge-cloud-flare/purge-cloud-flare.php 92% from 13 tests

The entry point to "Purge Cloud Flare" version 1.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected636 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP360135317
CSS1232218
JavaScript194101

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods416.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.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
8 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/spinner.png0.41KB0.33KB▼ 20.28%
screenshot2.png21.65KB9.66KB▼ 55.40%
screenshot1.png34.33KB15.91KB▼ 53.66%
screenshot4.png44.71KB11.73KB▼ 73.77%
screenshot5.png59.80KB16.43KB▼ 72.52%