84% wp-opcache-patch

Code Review | WP OPcache Patch

WordPress plugin WP OPcache Patch scored84%from 54 tests.

About plugin

  • Plugin page: wp-opcache-patch
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 6.3.1
  • First release: Aug 12, 2014
  • Latest release: Aug 30, 2014
  • Number of updates: 9
  • Update frequency: every 10.4 days
  • Top authors: extendwings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,538 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.75ms] Passed 4 tests

Analyzing server-side resources used by WP OPcache Patch
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0146.60 ▼0.12
Dashboard /wp-admin3.58 ▲0.0149.54 ▼6.37
Posts /wp-admin/edit.php3.69 ▲0.0152.75 ▼0.26
Add New Post /wp-admin/post-new.php6.16 ▲0.0193.03 ▼16.26
Media Library /wp-admin/upload.php3.50 ▲0.0140.28 ▲4.07

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP OPcache Patch
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▼0.001.75 ▼0.1641.03 ▼3.62
Dashboard /wp-admin2,198 ▲185.66 ▼0.0186.41 ▼2.1041.94 ▲3.85
Posts /wp-admin/edit.php2,100 ▲212.01 ▲0.0035.70 ▲0.3834.64 ▲0.04
Add New Post /wp-admin/post-new.php1,549 ▲1423.09 ▼0.12684.73 ▲59.6053.41 ▲0.08
Media Library /wp-admin/upload.php1,403 ▼04.21 ▼0.02103.05 ▲0.5940.60 ▼3.23

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-opcache-patch/wp-opcache-patch.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
7 plugin tags: php, hotfix, patch, opcache, bug...

wp-opcache-patch/wp-opcache-patch.php 92% from 13 tests

The main file in "WP OPcache Patch" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected84 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141145
Markdown115039

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods360.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
PNG images were not found in this plugin