78% arvancloud-cache-cleaner

Code Review | ArvanCloud Cache Cleaner

WordPress plugin ArvanCloud Cache Cleaner scored 78% from 54 tests.

About plugin

  • Plugin page: arvancloud-cache-...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 5.8.1
  • First release: Feb 5, 2016
  • Latest release: Jul 9, 2019
  • Number of updates: 27
  • Update frequency: every 46.3 days
  • Top authors: MasoudNikoomanesh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 3,125 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼148.97ms] Passed 4 tests

Server-side resources used by ArvanCloud Cache Cleaner
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.63 ▼0.2023.45 ▼17.23
Dashboard /wp-admin3.11 ▲0.0547.63 ▲4.45
Posts /wp-admin/edit.php3.16 ▲0.0545.91 ▼0.77
Add New Post /wp-admin/post-new.php5.47 ▲0.0390.88 ▼579.45
Media Library /wp-admin/upload.php3.05 ▲0.0533.66 ▲1.57
ابر آروان /wp-admin/options-general.php?page=ar_cache3.0432.49

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ArvanCloud Cache Cleaner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲11615.85 ▼0.038.54 ▼0.5047.42 ▼0.68
Dashboard /wp-admin2,982 ▲545.89 ▼0.04142.49 ▼0.65122.11 ▲11.65
Posts /wp-admin/edit.php2,748 ▲92.70 ▼0.1267.22 ▲1.4297.61 ▼3.19
Add New Post /wp-admin/post-new.php1,679 ▲17919.08 ▲0.30375.47 ▼43.04110.10 ▼12.03
Media Library /wp-admin/upload.php1,816 ▲125.02 ▼0.01155.55 ▼0.26120.47 ▼4.54
ابر آروان /wp-admin/options-general.php?page=ar_cache1,3162.7662.28105.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • ar_cache_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ar_cache
    • > Notice in wp-content/plugins/arvancloud-cache-cleaner/lib/ar_cache_options.php+88
    Undefined index: site

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'ar_cache_API' not found in wp-content/plugins/arvancloud-cache-cleaner/lib/ar_cache_options.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/arvancloud-cache-cleaner/Arvancloud.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Settings) image not found
Please take inspiration from this readme.txt

arvancloud-cache-cleaner/Arvancloud.php 85% from 13 tests

The main PHP file in "ArvanCloud Cache Cleaner" ver. 1.2.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("arvancloud-cache-cleaner.php" instead of "Arvancloud.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin530 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions10100.00%
▷ Anonymous functions00.00%
▷ Global constants4100.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
PNG images were not found in this plugin