94% apc-clear-cache

Code Review | APC Clear Cache

WordPress plugin APC Clear Cache scored 94% from 54 tests.

About plugin

  • Plugin page: apc-clear-cache
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.4.1
  • WordPress version: 5.8.1
  • First release: Jun 11, 2018
  • Latest release: May 29, 2020
  • Number of updates: 16
  • Update frequency: every 44.9 days
  • Top authors: obydul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 921 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by APC Clear Cache
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.28 ▲13.73
Dashboard /wp-admin3.08 ▲0.0235.78 ▼10.34
Posts /wp-admin/edit.php3.13 ▲0.0246.15 ▲2.50
Add New Post /wp-admin/post-new.php5.44 ▲0.0078.24 ▼637.73
Media Library /wp-admin/upload.php3.02 ▲0.0231.32 ▼1.44
APC Clear Cache /wp-admin/tools.php?page=apc-clear-cache2.9929.08

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for APC Clear Cache
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.84 ▲0.227.56 ▼2.7049.18 ▼4.41
Dashboard /wp-admin2,975 ▲445.86 ▼0.27135.10 ▼10.24111.87 ▼4.02
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0064.90 ▼6.8391.38 ▼4.47
Add New Post /wp-admin/post-new.php1,675 ▲9418.92 ▲4.57381.95 ▲0.25113.68 ▲0.59
Media Library /wp-admin/upload.php1,812 ▲25.03 ▲0.01150.69 ▼3.92124.40 ▲1.02
APC Clear Cache /wp-admin/tools.php?page=apc-clear-cache1,0462.1853.5572.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/apc-clear-cache/acc-mo-plugin.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/apc-clear-cache/acc-mo-plugin.php:57

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: apcu, purge, cache, apc

apc-clear-cache/apc-clear-cache.php Passed 13 tests

The main file in "APC Clear Cache" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
121 characters long description:
A very simple and single purpose plugin to completely clear the APC cache. To use, go to Tools and click APC Clear Cache.

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
Success! There were no dangerous files found in this plugin94 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3254994

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin