84% flush-opcache

Code Review | WP OPcache

WordPress plugin WP OPcache scored 84% from 54 tests.

About plugin

  • Plugin page: flush-opcache
  • Plugin version: 4.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Feb 15, 2017
  • Latest release: Jan 24, 2023
  • Number of updates: 52
  • Update frequency: every 41.9 days
  • Top authors: mnttech (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

10,000+ active / 169,723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.37ms] Passed 4 tests

An overview of server-side resources used by WP OPcache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.71 ▲2.52
Dashboard /wp-admin3.42 ▲0.1145.98 ▼1.46
Posts /wp-admin/edit.php3.53 ▲0.1860.67 ▲15.27
Add New Post /wp-admin/post-new.php6.00 ▲0.1190.98 ▼15.60
Media Library /wp-admin/upload.php3.34 ▲0.1134.80 ▼2.94

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 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 WP OPcache
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.29 ▼1.091.76 ▼0.0743.99 ▲4.89
Dashboard /wp-admin2,234 ▲465.90 ▲0.99103.21 ▼12.0140.97 ▼3.44
Posts /wp-admin/edit.php2,114 ▲252.02 ▲0.0340.58 ▲0.3136.83 ▲0.95
Add New Post /wp-admin/post-new.php1,549 ▲1623.32 ▼0.08665.94 ▲8.7059.41 ▲0.93
Media Library /wp-admin/upload.php1,416 ▲314.15 ▼0.0495.99 ▼12.9343.43 ▼3.85

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

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 | 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/flush-opcache/admin/class-flush-opcache-cached-files-list.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: php, multisite, opcache, cache, flush

flush-opcache/flush-opcache.php Passed 13 tests

The principal PHP file in "WP OPcache" v. 4.2.0 is loaded by WordPress automatically on each request
80 characters long description:
This plugin allows to manage Zend OPcache inside your WordPress admin dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,020 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7110283985
CSS14035

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity22.00
▷ Minimum class complexity2.00
▷ Maximum class complexity47.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods2666.67%
▷ Protected methods512.82%
▷ Private methods820.51%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin