73% opcache

Code Review | OPcache Dashboard

WordPress plugin OPcache Dashboard scored 73% from 54 tests.

About plugin

  • Plugin page: opcache
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Feb 19, 2014
  • Latest release: Dec 6, 2015
  • Number of updates: 32
  • Update frequency: every 20.5 days
  • Top authors: extendwings (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

1,000+ active / 41,729 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.96ms] Passed 4 tests

This is a short check of server-side resources used by OPcache Dashboard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.65 ▼2.28
Dashboard /wp-admin3.34 ▲0.0445.83 ▼0.83
Posts /wp-admin/edit.php3.38 ▲0.0244.90 ▲0.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.00 ▼1.15
Media Library /wp-admin/upload.php3.25 ▲0.0235.15 ▲2.93
Manual Control /wp-admin/admin.php?page=opcache-manual3.2432.83
Configuration /wp-admin/admin.php?page=opcache-config3.2931.90
Status /wp-admin/admin.php?page=opcache-status3.2625.71
Dashboard /wp-admin/admin.php?page=opcache3.2832.41
Scripts /wp-admin/admin.php?page=opcache-scripts6.6072.64

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by OPcache Dashboard
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲20313.72 ▼1.052.11 ▲0.1834.34 ▼15.08
Dashboard /wp-admin2,344 ▲1535.49 ▲0.58107.64 ▼5.9943.52 ▲0.02
Posts /wp-admin/edit.php2,124 ▲352.01 ▲0.0041.16 ▲3.0335.66 ▲3.11
Add New Post /wp-admin/post-new.php1,561 ▲2823.37 ▲0.34639.92 ▼19.8955.09 ▲3.95
Media Library /wp-admin/upload.php1,420 ▲324.22 ▲0.0197.43 ▼1.4440.53 ▼5.73
Manual Control /wp-admin/admin.php?page=opcache-manual8932.0325.9025.61
Configuration /wp-admin/admin.php?page=opcache-config1,4612.1826.5031.61
Status /wp-admin/admin.php?page=opcache-status1,1662.1522.0229.39
Dashboard /wp-admin/admin.php?page=opcache1,4933.5262.8946.86
Scripts /wp-admin/admin.php?page=opcache-scripts1,4732.0622.7532.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 58 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=opcache-status
    • > Warning in wp-admin/includes/class-wp-list-table.php+622
    count(): Parameter must be an array or an object that implements Countable

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/opcache/opcache.php
  • 35× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/opcache/views/widgets/version-info.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/opcache/views/widgets/graph.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/opcache/views/widgets/version-info.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/opcache/views/widgets/ctrl.php:22
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/opcache/views/admin.php on line 6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/opcache/views/widgets/version-info.php:6
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/opcache/views/widgets/version-info.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/opcache/views/widgets/dashboard.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/opcache/views/admin.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/opcache/views/widgets/dashboard.php on line 4

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: dashboard, php, server, stats, opcache...

opcache/opcache.php Passed 13 tests

The main file in "OPcache Dashboard" v. 0.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
40 characters long description:
OPcache dashboard designed for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,188 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP1411618997
SVG322515
CSS36931429
JavaScript5399,275165
HTML19082

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity34.75
▷ Minimum class complexity16.00
▷ Maximum class complexity63.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods47
▷ Static methods48.51%
▷ Public methods4697.87%
▷ Protected methods00.00%
▷ Private methods12.13%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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