84% flush-opcache-with-varnish

Code Review | Flush Opcache with Varnish

WordPress plugin Flush Opcache with Varnish scored84%from 54 tests.

About plugin

  • Plugin page: flush-opcache-wit...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 27, 2017
  • Latest release: Jan 14, 2018
  • Number of updates: 9
  • Update frequency: every 2.7 days
  • Top authors: johnnyb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.82ms] Passed 4 tests

Analyzing server-side resources used by Flush Opcache with Varnish
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.01 ▲0.06
Dashboard /wp-admin3.31 ▲0.0052.42 ▼0.11
Posts /wp-admin/edit.php3.36 ▲0.0050.64 ▲0.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.74 ▼14.22
Media Library /wp-admin/upload.php3.23 ▲0.0034.91 ▼1.01

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Flush Opcache with Varnish
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.77 ▲0.471.67 ▼0.0442.35 ▼3.36
Dashboard /wp-admin2,192 ▲125.53 ▼0.0983.17 ▼15.8941.52 ▼4.47
Posts /wp-admin/edit.php2,097 ▼62.01 ▼0.0336.23 ▼2.3636.18 ▼0.47
Add New Post /wp-admin/post-new.php1,545 ▲521.12 ▼1.93600.33 ▼55.5659.31 ▲2.52
Media Library /wp-admin/upload.php1,400 ▲94.22 ▲0.02104.04 ▲0.7446.15 ▲1.96

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 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)
Even though everything seems fine, this is not 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
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/flush-opcache-with-varnish/flush-opcache-with-varnish.php:118

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: cache, opcache, varnish

flush-opcache-with-varnish/flush-opcache-with-varnish.php 92% from 13 tests

Analyzing the main PHP file in "Flush Opcache with Varnish" version 1.1.2
You should first fix the following items:
  • 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 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin25 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1316425

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code1.50
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%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin