84% vcaching

Code Review | Varnish/Nginx Proxy Caching

WordPress plugin Varnish/Nginx Proxy Caching scored84%from 54 tests.

About plugin

  • Plugin page: vcaching
  • Plugin version: 1.8.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Nov 25, 2015
  • Latest release: Oct 21, 2019
  • Number of updates: 94
  • Update frequency: every 15.2 days
  • Top authors: razvanstanga (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /51,311 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.26MB] [CPU: ▲1.06ms] Passed 4 tests

An overview of server-side resources used by Varnish/Nginx Proxy Caching
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2839.53 ▲0.23
Dashboard /wp-admin3.56 ▲0.2649.08 ▼0.18
Posts /wp-admin/edit.php3.73 ▲0.3751.31 ▲0.81
Add New Post /wp-admin/post-new.php6.14 ▲0.2597.18 ▲4.77
Media Library /wp-admin/upload.php3.49 ▲0.2539.60 ▲3.37

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Varnish/Nginx Proxy Caching
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9314.47 ▼0.091.61 ▼0.1237.98 ▼2.94
Dashboard /wp-admin2,239 ▲515.82 ▲0.9497.63 ▼3.7672.41 ▲34.08
Posts /wp-admin/edit.php2,117 ▲252.01 ▲0.0239.41 ▼3.2736.08 ▲0.11
Add New Post /wp-admin/post-new.php1,529 ▼1317.55 ▼0.82659.31 ▲50.1556.57 ▲2.65
Media Library /wp-admin/upload.php1,409 ▲214.20 ▲0.0193.46 ▼15.9372.25 ▲28.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vcaching/vcaching.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: traffic, performance, cache, optimization, purge...

vcaching/vcaching.php Passed 13 tests

The main PHP file in "Varnish/Nginx Proxy Caching" ver. 1.8.3 adds more information about the plugin and also serves as the entry point for this plugin
36 characters long description:
WordPress Varnish Cache integration.

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
No dangerous file extensions were detected1,260 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP310952976
PO File27781172
reStructuredText1360112

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity75.00
▷ Minimum class complexity1.00
▷ Maximum class complexity149.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods54
▷ Static methods00.00%
▷ Public methods5194.44%
▷ Protected methods23.70%
▷ Private methods11.85%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png1.33KB1.31KB▼ 1.68%