84% oik-bwtrace

Code Review | oik bwtrace

WordPress plugin oik bwtrace scored84%from 54 tests.

About plugin

  • Plugin page: oik-bwtrace
  • Plugin version: 3.4.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0+
  • WordPress version: 6.3.1
  • First release: Sep 8, 2015
  • Latest release: Oct 15, 2023
  • Number of updates: 44
  • Update frequency: every 67.4 days
  • Top authors: bobbingwide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,092 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.70MB] [CPU: ▼1.80ms] Passed 4 tests

Server-side resources used by oik bwtrace
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6240.56 ▼0.46
Dashboard /wp-admin4.09 ▲0.7451.54 ▼7.80
Posts /wp-admin/edit.php4.14 ▲0.7851.00 ▲6.89
Add New Post /wp-admin/post-new.php6.61 ▲0.7199.14 ▼4.60
Media Library /wp-admin/upload.php3.95 ▲0.7138.19 ▲5.65
oik trace options /wp-admin/options-general.php?page=bw_trace_options4.1439.89
oik action options /wp-admin/options-general.php?page=bw_action_options3.9736.25

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

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

Browser metrics Passed 4 tests

A check of browser resources used by oik bwtrace
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲6214.19 ▲0.071.56 ▼0.1438.44 ▼7.35
Dashboard /wp-admin2,203 ▲295.49 ▼0.1186.13 ▲2.6539.23 ▲1.24
Posts /wp-admin/edit.php2,105 ▲51.99 ▲0.0133.21 ▼6.6435.43 ▼1.89
Add New Post /wp-admin/post-new.php1,532 ▼1723.80 ▲5.30591.89 ▼51.6963.19 ▲5.64
Media Library /wp-admin/upload.php1,402 ▲54.19 ▲0.0096.88 ▼5.3341.63 ▼1.01
oik trace options /wp-admin/options-general.php?page=bw_trace_options1,4554.7349.1448.33
oik action options /wp-admin/options-general.php?page=bw_action_options1,2954.6549.3644.06

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • 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)
Good news, no errors were detected

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 take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/oik-bwtrace/includes/class-trace-command.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bw_array_get() in wp-content/plugins/oik-bwtrace/includes/bwtrace-anychange.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/oik-bwtrace/includes/bwtrace-actions.php:478
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bw_array_get() in wp-content/plugins/oik-bwtrace/includes/bwtrace-stringwatch.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Trace files directory box), #2 (Trace options - Requests sections), #3 (Trace options - Trace records), #4 (Daily Trace Summary box), #5 (Action options - Options), #6 (Action options - Ad hoc tracing), #7 (Trace information box), #8 (Raw trace output), #9 (Daily Trace Summary file)
  • Tested up to: Invalid version format
You can take inspiration from this readme.txt

oik-bwtrace/oik-bwtrace.php Passed 13 tests

The primary PHP file in "oik bwtrace" version 3.4.3 is used by WordPress to initiate all plugin functionality
62 characters long description:
Debug trace for WordPress, including action and filter tracing

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
Everything looks great! No dangerous files found in this plugin6,599 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,0695,0135,712
PO File3251251566
Pascal262165191
Markdown1300123
CSS1157

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity18.92
▷ Minimum class complexity4.00
▷ Maximum class complexity47.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods206
▷ Static methods4421.36%
▷ Public methods18891.26%
▷ Protected methods00.00%
▷ Private methods188.74%
Functions348
▷ Named functions348100.00%
▷ Anonymous functions00.00%
Constants40
▷ Global constants40100.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 were not PNG files found in your plugin