83% cache-control-by-cacholong

Code Review | Cache control by Cacholong

WordPress plugin Cache control by Cacholong scored83%from 54 tests.

About plugin

  • Plugin page: cache-control-by-...
  • Plugin version: 5.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-5.7
  • WordPress version: 6.3.1
  • First release: Mar 6, 2018
  • Latest release: Jul 20, 2021
  • Number of updates: 27
  • Update frequency: every 45.7 days
  • Top authors: preliot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,446 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.69MB] [CPU: ▼5.19ms] Passed 4 tests

This is a short check of server-side resources used by Cache control by Cacholong
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.6638.21 ▼5.22
Dashboard /wp-admin4.01 ▲0.6648.29 ▼14.64
Posts /wp-admin/edit.php4.12 ▲0.7649.04 ▲4.42
Add New Post /wp-admin/post-new.php6.61 ▲0.7292.23 ▼4.55
Media Library /wp-admin/upload.php3.93 ▲0.7038.20 ▲3.67
Cache control /wp-admin/options-general.php?page=cacholong-cache-control-settings-page3.9241.76

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 22 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Cache control by Cacholong
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10913.30 ▼1.081.87 ▼0.1242.13 ▼0.30
Dashboard /wp-admin2,237 ▲465.88 ▲0.97107.87 ▲2.3038.96 ▼6.36
Posts /wp-admin/edit.php2,123 ▲312.07 ▲0.0139.92 ▲2.1533.23 ▼0.57
Add New Post /wp-admin/post-new.php1,562 ▲4818.66 ▲1.13627.24 ▼60.6360.43 ▼3.09
Media Library /wp-admin/upload.php1,422 ▲374.24 ▲0.04101.68 ▲2.3740.55 ▼4.18
Cache control /wp-admin/options-general.php?page=cacholong-cache-control-settings-page1,0042.1526.9830.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI' not found in wp-content/plugins/cache-control-by-cacholong/core/libraries/WPCLI/Commands.php:276

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)
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
You can look at the official readme.txt

cache-control-by-cacholong/CacholongCacheControl.php 85% from 13 tests

"Cache control by Cacholong" version 5.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cache-control-by-cacholong.php" instead of "CacholongCacheControl.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin3,005 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PO File2132154398

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.21
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
▷ Abstract classes1435.90%
▷ Concrete classes2564.10%
▷ Final classes00.00%
▷ Static methods11357.95%
▷ Public methods14574.36%
▷ Protected methods136.67%
▷ Private methods3718.97%
▷ Named functions2692.86%
▷ Anonymous functions27.14%
▷ Global constants87.92%
▷ Class constants9392.08%
▷ Public constants93100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin