94% purgely

Code Review | Purgely

WordPress plugin Purgely scored 94% from 54 tests.

About plugin

  • Plugin page: purgely
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0+
  • WordPress version: 5.8.1
  • First release: Jan 11, 2016
  • Latest release: Jun 15, 2016
  • Number of updates: 7
  • Update frequency: every 32.3 days
  • Top authors: tollmanz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 12,874 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.20MB] [CPU: ▼141.26ms] Passed 4 tests

This is a short check of server-side resources used by Purgely
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.05 ▲0.3344.91 ▲23.90
Dashboard /wp-admin3.35 ▲0.2950.03 ▲1.56
Posts /wp-admin/edit.php3.17 ▲0.0638.89 ▼7.72
Add New Post /wp-admin/post-new.php5.65 ▲0.22105.97 ▼557.09
Media Library /wp-admin/upload.php3.23 ▲0.2236.00 ▼1.79
Purgely /wp-admin/options-general.php?page=purgely3.2034.60

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Purgely
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.92 ▲0.329.83 ▲0.9946.85 ▲1.29
Dashboard /wp-admin2,972 ▲415.94 ▼0.06139.82 ▼7.47107.90 ▲1.93
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0294.33 ▲22.3993.03 ▲1.84
Add New Post /wp-admin/post-new.php1,584 ▼9920.67 ▲3.19528.44 ▲148.19114.93 ▲9.19
Media Library /wp-admin/upload.php1,815 ▲85.05 ▲0.05149.27 ▼10.24115.71 ▲1.80
Purgely /wp-admin/options-general.php?page=purgely1,2772.0959.10106.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Purgely_Header' not found in wp-content/plugins/purgely/src/classes/header-surrogate-control.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Purgely_Header' not found in wp-content/plugins/purgely/src/classes/header-cache-control.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/purgely/purgely.php:111
    • > PHP Fatal error
      Uncaught Error: Class 'Purgely_Header' not found in wp-content/plugins/purgely/src/classes/header-surrogate-keys.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/purgely/src/wp-purges.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/purgely/src/wp-cli.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/purgely/src/settings-page.php:38

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tested up to: Version not formatted correctly
The official readme.txt might help

purgely/purgely.php Passed 13 tests

The main file in "Purgely" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
A plugin to manage Fastly caching behavior and purging.

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
Everything looks great! No dangerous files found in this plugin1,320 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP153291,5401,281
Markdown116039

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.31
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods127
▷ Static methods75.51%
▷ Public methods10582.68%
▷ Protected methods00.00%
▷ Private methods2217.32%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin