84% ergonet-varnish-cache

Code Review | Ergonet Varnish Cache

WordPress plugin Ergonet Varnish Cache scored84%from 54 tests.

About plugin

  • Plugin page: ergonet-varnish-c...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Jan 20, 2020
  • Latest release: Apr 20, 2023
  • Number of updates: 16
  • Update frequency: every 74.9 days
  • Top authors: ergonet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,866 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.05MB] [CPU: ▲0.03ms] Passed 4 tests

This is a short check of server-side resources used by Ergonet Varnish Cache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.45 ▼0.46
Dashboard /wp-admin3.35 ▲0.0553.94 ▲3.70
Posts /wp-admin/edit.php3.40 ▲0.0552.91 ▼1.48
Add New Post /wp-admin/post-new.php5.95 ▲0.06164.48 ▲56.50
Media Library /wp-admin/upload.php3.27 ▲0.0436.11 ▼1.65
Ergonet Varnish Cache /wp-admin/options-general.php?page=varnishCacheInfo3.2535.25

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Ergonet Varnish Cache
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.35 ▲0.001.70 ▼0.8745.09 ▲0.85
Dashboard /wp-admin2,222 ▲485.56 ▼0.1185.79 ▼7.8839.52 ▼1.84
Posts /wp-admin/edit.php2,130 ▲272.11 ▲0.1337.99 ▼2.4336.29 ▼1.81
Add New Post /wp-admin/post-new.php1,562 ▲3618.32 ▼5.02618.27 ▼50.8580.20 ▲19.87
Media Library /wp-admin/upload.php1,433 ▲334.20 ▲0.0196.03 ▼8.3144.02 ▼2.37
Ergonet Varnish Cache /wp-admin/options-general.php?page=varnishCacheInfo9431.9626.3529.78

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

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ergonet-varnish-cache/varnishCache.php

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: cache

ergonet-varnish-cache/varnishCache.php 85% from 13 tests

"Ergonet Varnish Cache" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 231 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("ergonet-varnish-cache.php" instead of "varnishCache.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected138 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22727138

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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