94% clear-cache-for-timber

Code Review | Clear cache for Timber

WordPress plugin Clear cache for Timber scored 94% from 53 tests.

About plugin

  • Plugin page: clear-cache-for-t...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.1-4.5.2
  • WordPress version: 5.8.1
  • First release: Jan 13, 2016
  • Latest release: Jun 7, 2016
  • Number of updates: 17
  • Update frequency: every 8.6 days
  • Top authors: ogrosko (100%)

Code review

53 tests

User reviews

1 review

Install metrics

900+ active / 6,071 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼606.28ms] Passed 4 tests

A check of server-side resources used by Clear cache for Timber
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0231.94 ▼5.45
Dashboard /wp-admin3.07 ▲0.0142.57 ▼8.28
Posts /wp-admin/edit.php3.13 ▲0.0248.16 ▲2.51
Add New Post /wp-admin/post-new.php5.43 ▲0.0084.18 ▼2,409.69
Media Library /wp-admin/upload.php3.01 ▲0.0128.72 ▼1.69

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Clear cache for Timber: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲10516.30 ▲0.777.48 ▼1.0251.32 ▲1.75
Dashboard /wp-admin2,958 ▲965.90 ▲0.04131.25 ▲0.03113.96 ▲18.81
Posts /wp-admin/edit.php2,736 ▲302.68 ▼0.0163.53 ▼7.6187.93 ▼9.55
Add New Post /wp-admin/post-new.php2,264 ▲61125.08 ▲6.56359.02 ▲23.37105.35 ▼1.01
Media Library /wp-admin/upload.php1,746 ▼294.97 ▼0.03129.28 ▼16.96132.36 ▲26.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clear-cache-for-timber/clear-cache-for-timber.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Clear cache for Timber in Wordpress) image not found
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

clear-cache-for-timber/clear-cache-for-timber.php Passed 13 tests

This is the main PHP file of "Clear cache for Timber" version 0.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
39 characters long description:
Clear cache for Timber and Twig caching

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
Everything looks great! No dangerous files found in this plugin152 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png6.98KB6.93KB▼ 0.67%