72% plugin-detective

Code Review | Plugin Detective - Troubleshooting Conflicts

WordPress plugin Plugin Detective - Troubleshooting Conflicts scored 72% from 54 tests.

About plugin

  • Plugin page: plugin-detective
  • Plugin version: 1.2.16
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: May 12, 2018
  • Latest release: Sep 27, 2023
  • Number of updates: 74
  • Update frequency: every 26.6 days
  • Top authors: croixhaug (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

7,000+ active / 131,302 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: ▼1.74ms] Passed 4 tests

Server-side resources used by Plugin Detective - Troubleshooting Conflicts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.79 ▼5.17
Dashboard /wp-admin3.32 ▲0.0245.33 ▼1.38
Posts /wp-admin/edit.php3.37 ▲0.0249.22 ▲1.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.81 ▼1.72
Media Library /wp-admin/upload.php3.24 ▲0.0235.27 ▲2.22
Plugin Detective /wp-admin/tools.php?page=plugin-detective3.0824.19

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 159 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Detective - Troubleshooting Conflicts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.65 ▼0.971.75 ▼0.0144.22 ▲0.35
Dashboard /wp-admin2,219 ▲314.87 ▼0.03108.16 ▲3.8547.98 ▲7.60
Posts /wp-admin/edit.php2,108 ▲192.04 ▲0.0139.88 ▲3.6635.01 ▲4.24
Add New Post /wp-admin/post-new.php1,539 ▲623.21 ▲0.39584.77 ▼83.4564.32 ▲13.13
Media Library /wp-admin/upload.php1,404 ▲194.24 ▲0.0394.78 ▼12.8743.50 ▼2.80
Plugin Detective /wp-admin/tools.php?page=plugin-detective3735.5868.3147.37

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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/plugin-detective/troubleshoot/app/local-get-app.php
    • > /wp-content/plugins/plugin-detective/troubleshoot/app_old/local-get-app.php
    • > /wp-content/plugins/plugin-detective/troubleshoot/index.php
    • > /wp-content/plugins/plugin-detective/troubleshoot/api.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plugin-detective/plugin-detective.php:394
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/plugin-detective/troubleshoot/includes/class-settings.php on line 82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/plugin-detective/languages/troubleshoot-app-translations.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/plugin-detective/troubleshoot/includes/class-settings.php on line 95
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/plugin-detective/troubleshoot/includes/class-settings.php on line 83
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/plugin-detective/troubleshoot/includes/class-settings.php on line 81
    • > PHP Warning
      require_once(ABSPATHwp-includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/plugin-detective/troubleshoot/includes/class-settings.php on line 95
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/plugin-detective/troubleshoot/includes/class-settings.php on line 95

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/tools.php?page=plugin-detective
    • > Javascript (severe) in unknown
    /wp-content/plugins/plugin-detective/troubleshoot/app/dist/static/js/chunk-vendors.js?v=1.2.16 56:111483

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5, #6 in plugin-detective/assets to your readme.txt
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

plugin-detective/plugin-detective.php Passed 13 tests

The entry point to "Plugin Detective - Troubleshooting Conflicts" version 1.2.16 is a PHP file that has certain tags in its header comment area
43 characters long description:
Quickly troubleshoot & fix plugin conflicts

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
There were no executable files found in this plugin37,754 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
JSON50031,209
PHP217081,5162,508
Vuejs Component2775182,112
JavaScript28651731,375
Sass14240493
HTML30233
SVG80119
CSS2045

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity20.17
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes211.11%
Methods171
▷ Static methods179.94%
▷ Public methods16898.25%
▷ Protected methods21.17%
▷ Private methods10.58%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants35
▷ Global constants3394.29%
▷ Class constants25.71%
▷ 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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
troubleshoot/app/src/assets/logo.png6.69KB3.22KB▼ 51.86%