89% server-side-cache-autopurge

Code Review | Server-Side Cache AutoPurge

WordPress plugin Server-Side Cache AutoPurge scored89%from 54 tests.

About plugin

  • Plugin page: server-side-cache...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Dec 4, 2020
  • Latest release: Sep 4, 2023
  • Number of updates: 18
  • Update frequency: every 55.8 days
  • Top authors: suresupport (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

7,000+ active /22,738 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼11.00ms] Passed 4 tests

An overview of server-side resources used by Server-Side Cache AutoPurge
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0935.55 ▼8.56
Dashboard /wp-admin3.40 ▲0.0643.02 ▼14.77
Posts /wp-admin/edit.php3.52 ▲0.1644.57 ▼8.26
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.38 ▼12.41
Media Library /wp-admin/upload.php3.33 ▲0.1036.48 ▲1.05

Server storage [IO: ▲0.06MB] [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: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Server-Side Cache AutoPurge
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.37 ▲0.021.66 ▼0.1443.18 ▼0.30
Dashboard /wp-admin2,212 ▲355.55 ▼0.1282.81 ▼11.1535.29 ▼5.44
Posts /wp-admin/edit.php2,118 ▲182.02 ▲0.0537.01 ▼2.0332.89 ▼4.04
Add New Post /wp-admin/post-new.php1,537 ▲1123.18 ▲0.14612.17 ▼88.3875.18 ▲26.72
Media Library /wp-admin/upload.php1,412 ▲124.14 ▼0.11100.92 ▼2.6245.17 ▼0.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: wp-cache, flush, fast, purge, caching...

server-side-cache-autopurge/surecache-autopurge.php 85% from 13 tests

The entry point to "Server-Side Cache AutoPurge" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("server-side-cache-autopurge.php" instead of "surecache-autopurge.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected457 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP48987335
PO File3182486
JavaScript10133
CSS1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity16.50
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin