78% wsa-cachepurge

Code Review | WSA - Website Accelerator Cache Purge

WordPress plugin WSA - Website Accelerator Cache Purge scored78%from 54 tests.

About plugin

  • Plugin page: wsa-cachepurge
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2019
  • Latest release: Aug 28, 2023
  • Number of updates: 32
  • Update frequency: every 42.8 days
  • Top authors: astralinternet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,870 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.02ms] Passed 4 tests

An overview of server-side resources used by WSA - Website Accelerator Cache Purge
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1141.66 ▼1.66
Dashboard /wp-admin3.41 ▲0.1153.59 ▼2.75
Posts /wp-admin/edit.php3.53 ▲0.1752.29 ▲2.48
Add New Post /wp-admin/post-new.php5.99 ▲0.1186.96 ▼10.15
Media Library /wp-admin/upload.php3.34 ▲0.1141.50 ▲5.20
Website Accelerator Cache purge /wp-admin/tools.php?page=wsa-cachepurge/lib/wsa-cachepurge_display.php3.3554.54

Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/wsa-cachepurge/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
wsa-cachepurge_wsa-installed
wsa-cachepurge_auto-purge
can_compress_scripts

Browser metrics Passed 4 tests

WSA - Website Accelerator Cache Purge: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.47 ▲0.042.07 ▲0.2648.17 ▲4.79
Dashboard /wp-admin2,234 ▲344.84 ▼0.98107.01 ▼7.6037.67 ▼7.33
Posts /wp-admin/edit.php2,113 ▲101.98 ▼0.0738.35 ▲2.2535.54 ▼1.44
Add New Post /wp-admin/post-new.php1,532 ▼1317.68 ▼5.69684.29 ▼0.1864.41 ▲4.90
Media Library /wp-admin/upload.php1,416 ▲164.26 ▲0.01103.20 ▼12.1344.20 ▼3.59
Website Accelerator Cache purge /wp-admin/tools.php?page=wsa-cachepurge/lib/wsa-cachepurge_display.php9602.0226.6953.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • wsa-cachepurge_wsa-installed
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wsa-cachepurge/lib/wsa-cachepurge_display.php
    • > /wp-content/plugins/wsa-cachepurge/lib/wsa-cachepurge_wp-module.class.php
    • > /wp-content/plugins/wsa-cachepurge/lib/wsa-cachepurge_display.class.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wsa-cachepurge/wsa-cachepurge.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: cache, cpwsa, wsa, wsa-cachepurge, purge...

wsa-cachepurge/wsa-cachepurge.php 85% from 13 tests

The primary PHP file in "WSA - Website Accelerator Cache Purge" version 1.1.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 205 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("3.5" instead of "3.5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,516 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PO File5183219819
PHP6190623543
SVG101154

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.00
▷ Minimum class complexity7.00
▷ Maximum class complexity26.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods2496.00%
▷ Public methods1456.00%
▷ Protected methods00.00%
▷ Private methods1144.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
ressources/clear-single-user-cache-white.png0.65KB0.77KB0.00%