10% wp-super-cache

Code Review | WP Super Cache

WordPress plugin WP Super Cache scored10%from 54 tests.

About plugin

  • Plugin page: wp-super-cache
  • Plugin version: 1.11.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Nov 5, 2007
  • Latest release: Nov 8, 2023
  • Number of updates: 1,633
  • Update frequency: every 3.6 days
  • Top authors: donncha (93.94%)kraftbj (2.82%)jetpackisbestpack (1.96%)

Code review

54 tests

User reviews

1322 reviews

Install metrics

1,000,000+ active /49,507,583 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-super-cache/wp-cache.php+110
    include(wp-content/wp-cache-config.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲1.94MB] [CPU: ▲8.87ms] Passed 4 tests

This is a short check of server-side resources used by WP Super Cache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.44 ▲1.9846.51 ▲5.34
Dashboard /wp-admin5.27 ▲1.9759.15 ▲9.98
Posts /wp-admin/edit.php5.31 ▲1.9662.82 ▲13.49
Add New Post /wp-admin/post-new.php7.82 ▲1.9492.86 ▲6.67
Media Library /wp-admin/upload.php5.13 ▲1.9051.99 ▲21.12
WP Super Cache /wp-admin/options-general.php?page=wpsupercache5.2881.84

Server storage [IO: ▲3.50MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Illegal file modification detected: 8 files (9.25KB) outside of "wp-content/plugins/wp-super-cache/" and "wp-content/uploads/"
    • (new file) wp-content/advanced-cache.php
    • (new file) wp-content/cache/meta/index.html
    • (new file) wp-content/cache/.htaccess
    • (new file) wp-content/cache/index.html
    • (new file) wp-content/wp-cache-config.php
    • (new file) wp-content/cache/supercache/index.html
    • (modified) wp-config.php
    • (new file) wp-content/cache/blogs/index.html
Filesystem: 106 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
wpsupercache_start
widget_theysaidso_widget
wpsupercache_count
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Super Cache
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7014.24 ▼0.111.61 ▼0.2838.50 ▼6.31
Dashboard /wp-admin2,231 ▲515.52 ▼0.1490.71 ▼1.8242.44 ▲2.31
Posts /wp-admin/edit.php2,140 ▲402.14 ▲0.1841.50 ▲4.7935.14 ▲2.95
Add New Post /wp-admin/post-new.php1,564 ▲3825.39 ▲2.22689.43 ▲9.0465.21 ▲8.27
Media Library /wp-admin/upload.php1,430 ▲304.20 ▲0.00104.53 ▼2.5345.01 ▲1.40
WP Super Cache /wp-admin/options-general.php?page=wpsupercache1,2271.7127.8448.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-super-cache/wp-cache.php+1933
    unlink(wp-content/cache/blogs/index.html): No such file or directory
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • wpsupercache_start
    • theysaidso_admin_options
    • wpsupercache_count
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 34× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_cacheaction() in wp-content/plugins/wp-super-cache/plugins/domain-mapping.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_cacheaction() in wp-content/plugins/wp-super-cache/plugins/wptouch.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-super-cache/partials/lockdown.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/wp-super-cache/wp-cache-base.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-super-cache/inc/preload-notification.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/wp-super-cache/plugins/multisite.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-super-cache/partials/restore.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/wp-super-cache/partials/advanced.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-settings.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpsupercache
    • > Other (warning) in unknown
    other - Failed parsing 'srcset' attribute value since it has an unknown descriptor.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpsupercache
    • > Other (warning) in unknown
    other - Dropped srcset candidate "/wp-content/plugins/wp-super-cache//assets/boost-install-card-main.png"

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: cache, caching, wp-super-cache, performance, wp-cache

wp-super-cache/wp-cache.php 92% from 13 tests

The primary PHP file in "WP Super Cache" version 1.11.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-super-cache.php" instead of "wp-cache.php")

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
No dangerous file extensions were detected25,689 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PO File165,6037,63112,858
PHP491,8611,80611,453
Markdown62650829
JavaScript33530204
JSON400168
CSS1226146
SVG20031

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity32.06
▷ Minimum class complexity1.00
▷ Maximum class complexity294.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods162
▷ Static methods7445.68%
▷ Public methods11570.99%
▷ Protected methods4326.54%
▷ Private methods42.47%
Functions274
▷ Named functions26998.18%
▷ Anonymous functions51.82%
Constants45
▷ Global constants3373.33%
▷ Class constants1226.67%
▷ Public constants12100.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
4 PNG files occupy 0.42MB with 0.20MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/boost-install-card-main.png93.93KB38.92KB▼ 58.56%
assets/super-cache-icon.png4.14KB3.32KB▼ 19.65%
assets/automattic-airline.png3.49KB1.90KB▼ 45.50%
assets/boost-install-card-main-2x.png333.52KB131.44KB▼ 60.59%