84% clear-cache-for-widgets

Code Review | Clear Cache for Me

WordPress plugin Clear Cache for Me scored84%from 54 tests.

About plugin

  • Plugin page: clear-cache-for-w...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Jan 24, 2014
  • Latest release: Aug 17, 2023
  • Number of updates: 82
  • Update frequency: every 42.6 days
  • Top authors: webheadllc (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

40,000+ active /448,750 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼0.58ms] Passed 4 tests

An overview of server-side resources used by Clear Cache for Me
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1545.46 ▲3.14
Dashboard /wp-admin3.44 ▲0.1349.66 ▼1.81
Posts /wp-admin/edit.php3.55 ▲0.1953.97 ▲0.81
Add New Post /wp-admin/post-new.php6.04 ▲0.1592.31 ▼4.45
Media Library /wp-admin/upload.php3.36 ▲0.1338.07 ▲3.94
Clear Cache for Me /wp-admin/options-general.php?page=ccfm-options3.3335.00

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Clear Cache for Me
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲19313.46 ▼0.918.51 ▲6.6240.87 ▼6.79
Dashboard /wp-admin2,270 ▲935.72 ▲0.0293.55 ▲5.9941.14 ▼4.91
Posts /wp-admin/edit.php2,124 ▲242.04 ▼0.0134.89 ▼1.3932.18 ▼5.97
Add New Post /wp-admin/post-new.php1,554 ▲2823.11 ▲5.62644.40 ▼18.5450.24 ▼3.55
Media Library /wp-admin/upload.php1,421 ▲244.27 ▲0.05104.33 ▲4.7942.48 ▼5.22
Clear Cache for Me /wp-admin/options-general.php?page=ccfm-options1,2522.0924.2433.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • _ccfm_style_timestamp_theme
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clear-cache-for-widgets/options-page.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clear-cache-for-widgets/options-page.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: widget, purge, clear, js, wpengine...

clear-cache-for-widgets/clear-cache-for-widgets.php 92% from 13 tests

The main file in "Clear Cache for Me" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin829 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4140222757
JavaScript21041
PO File18831

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin