90% cache-control

Code Review | Cache-Control

WordPress plugin Cache-Control scored 90% from 54 tests.

About plugin

  • Plugin page: cache-control
  • Plugin version: 2.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2016
  • Latest release: Aug 30, 2019
  • Number of updates: 48
  • Update frequency: every 27.4 days
  • Top authors: geekysoft (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active / 76,035 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.85ms] Passed 4 tests

A check of server-side resources used by Cache-Control
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.23 ▼2.51
Dashboard /wp-admin3.39 ▲0.0842.93 ▼10.82
Posts /wp-admin/edit.php3.44 ▲0.0852.74 ▲8.76
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.70 ▼6.05
Media Library /wp-admin/upload.php3.31 ▲0.0838.66 ▲3.97
Cache-Control /wp-admin/options-general.php?page=cache_control3.2938.73

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Cache-Control
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.26 ▼1.151.73 ▲0.0240.78 ▼3.19
Dashboard /wp-admin2,210 ▲224.84 ▼1.04112.51 ▲9.6942.36 ▼4.68
Posts /wp-admin/edit.php2,093 ▲72.05 ▲0.0240.99 ▲4.9236.02 ▲1.12
Add New Post /wp-admin/post-new.php1,537 ▲1823.45 ▲0.37633.80 ▼31.0953.55 ▼9.28
Media Library /wp-admin/upload.php1,395 ▲134.20 ▼0.0494.53 ▼4.5440.55 ▲0.26
Cache-Control /wp-admin/options-general.php?page=cache_control1,4912.1828.5335.14

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: caching, http, performance, cache-control

cache-control/cache-control.php Passed 13 tests

The main PHP script in "Cache-Control" version 2.2.5 is automatically included on every request by WordPress
76 characters long description:
Configurable HTTP Cache-Control headers for webpages generated by WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin456 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27129456

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.85
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin