84% clear-opcache

Code Review | Clear OPcache

WordPress plugin Clear OPcache scored 84% from 54 tests.

About plugin

  • Plugin page: clear-opcache
  • Plugin version: 0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Nov 13, 2019
  • Latest release: Dec 7, 2019
  • Number of updates: 12
  • Update frequency: every 2.3 days
  • Top authors: jessehorne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 946 total downloads


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.01MB] [CPU: ▲1.24ms] Passed 4 tests

Server-side resources used by Clear OPcache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.79 ▼4.62
Dashboard /wp-admin3.32 ▲0.0153.87 ▲5.29
Posts /wp-admin/edit.php3.37 ▲0.0153.88 ▲5.42
Add New Post /wp-admin/post-new.php5.90 ▲0.01102.69 ▲9.62
Media Library /wp-admin/upload.php3.24 ▲0.0134.75 ▼1.15
OPcache /wp-admin/options-general.php?page=bc_cocp8.6855.50

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Clear OPcache
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.73 ▼0.901.63 ▲0.0140.84 ▼4.77
Dashboard /wp-admin2,227 ▲395.90 ▲0.00180.43 ▲76.0853.90 ▲10.02
Posts /wp-admin/edit.php2,113 ▲241.97 ▼0.0742.91 ▲7.9335.27 ▲5.24
Add New Post /wp-admin/post-new.php1,556 ▲3418.41 ▼4.85620.64 ▼44.5453.70 ▼1.83
Media Library /wp-admin/upload.php1,412 ▲214.23 ▲0.0093.92 ▼6.2640.31 ▼3.64
OPcache /wp-admin/options-general.php?page=bc_cocp1,0992.0221.2827.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • bc_cocp_plugin_notice_shown
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • bc_cocp_plugin_activated

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/clear-opcache/clear_op_cache_plugin.php

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

clear-opcache/clear_op_cache_plugin.php 92% from 13 tests

This is the main PHP file of "Clear OPcache" version 0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("clear-opcache.php" instead of "clear_op_cache_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected183 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions12100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin