66% mitm-bug-tracker

Code Review | Mitm Bug Tracker

WordPress plugin Mitm Bug Tracker scored 66% from 54 tests.

About plugin

  • Plugin page: mitm-bug-tracker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6+
  • WordPress version: 5.8.1
  • First release: Nov 10, 2013
  • Latest release: Nov 10, 2013
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: mahesh_9696 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 859 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼140.24ms] Passed 4 tests

Analyzing server-side resources used by Mitm Bug Tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1540.33 ▲17.20
Dashboard /wp-admin3.11 ▲0.0648.66 ▼3.29
Posts /wp-admin/edit.php3.16 ▲0.0650.09 ▲7.58
Add New Post /wp-admin/post-new.php5.48 ▲0.0495.83 ▼555.50
Media Library /wp-admin/upload.php3.06 ▲0.0532.82 ▼9.76
Add New OS /wp-admin/admin.php?page=mitm_bugtracker_os_add3.0231.08
Bugtracker /wp-admin/admin.php?page=mitm_bugtracker_view3.0632.57
Members /wp-admin/admin.php?page=mitm_bugtracker_member_view3.0528.52
Add New Member /wp-admin/admin.php?page=mitm_bugtracker_member_add3.0231.77
Add New Bug /wp-admin/admin.php?page=mitm_bugtracker_add3.0530.57
Operating System /wp-admin/admin.php?page=mitm_bugtracker_os_view3.0531.79
Browser /wp-admin/admin.php?page=mitm_bugtracker_browser_view3.0531.44
Add New Browser /wp-admin/admin.php?page=mitm_bugtracker_browser_add3.0233.17

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: 4 new tables, no new options
New tables
wp_mitm_member
wp_mitm_browser
wp_mitm_bug_tracker
wp_mitm_os

Browser metrics Passed 4 tests

Checking browser requirements for Mitm Bug Tracker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,770 ▲17415.87 ▲0.379.26 ▼0.8048.05 ▲1.58
Dashboard /wp-admin3,032 ▲1016.03 ▼0.03141.43 ▼5.28127.36 ▲11.05
Posts /wp-admin/edit.php2,823 ▲842.70 ▲0.0165.34 ▼0.8593.48 ▲0.55
Add New Post /wp-admin/post-new.php1,649 ▲14918.49 ▼0.13407.77 ▲7.34111.83 ▼20.97
Media Library /wp-admin/upload.php1,820 ▲725.00 ▼0.02134.45 ▼18.12142.76 ▲8.72
Add New OS /wp-admin/admin.php?page=mitm_bugtracker_os_add1,1402.0954.2177.41
Bugtracker /wp-admin/admin.php?page=mitm_bugtracker_view1,3642.0558.2671.20
Members /wp-admin/admin.php?page=mitm_bugtracker_member_view1,2822.0855.8265.61
Add New Member /wp-admin/admin.php?page=mitm_bugtracker_member_add1,1282.0954.4279.39
Add New Bug /wp-admin/admin.php?page=mitm_bugtracker_add1,3452.1057.5774.24
Operating System /wp-admin/admin.php?page=mitm_bugtracker_os_view1,2822.0659.5469.88
Browser /wp-admin/admin.php?page=mitm_bugtracker_browser_view1,2822.0956.5769.50
Add New Browser /wp-admin/admin.php?page=mitm_bugtracker_browser_add1,1252.0956.5281.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_mitm_bug_tracker
    • wp_mitm_browser
    • wp_mitm_member
    • wp_mitm_os

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_os_add
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_os_add.php+26
    Undefined variable: os_name
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_view
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_view.php+104
    Undefined index: bug
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_member_add
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_member_add.php+24
    Undefined variable: member_name
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_add
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_add.php+44
    Undefined variable: bt_project_name
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_add
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_add.php+48
    Undefined variable: bt_url
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_add
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_add.php+54
    Undefined variable: bt_desc
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_add
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_add.php+111
    Undefined variable: bt_priority
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_add
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_add.php+119
    Undefined variable: bt_fixed
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_browser_add
    • > Notice in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_browser_add.php+24
    Undefined variable: browser_name

SRP 0% 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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_os_add.php
    • > /wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_browser_add.php
    • > /wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_member_add.php
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > 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/mitm-bug-tracker/mitm_bugtracker_view.php on line 12
    • > 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/mitm-bug-tracker/mitm_bugtracker_browser_view.php on line 12
    • > 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/mitm-bug-tracker/mitm_bugtracker_member_view.php on line 3
    • > 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/mitm-bug-tracker/mitm_bugtracker_view.php on line 12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_add.php:18
    • > 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/mitm-bug-tracker/mitm_bugtracker_browser_view.php on line 12
    • > 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/mitm-bug-tracker/mitm_bugtracker_os_view.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_os_view.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_browser_view.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mitm-bug-tracker/mitm_bugtracker_view.php on line 12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mitm_bugtracker_browser_add
    • > Network (severe)
    wp-content/plugins/mitm-bugtracker/icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

mitm-bug-tracker/mitm-bugtracker.php 92% from 13 tests

The main PHP file in "Mitm Bug Tracker" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mitm-bug-tracker.php" instead of "mitm-bugtracker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected935 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP913065935

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.80
▷ Minimum class complexity7.00
▷ Maximum class complexity17.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods47
▷ Static methods00.00%
▷ Public methods47100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.77KB0.84KB0.00%