68% where-used

Code Review | WhereUsed

WordPress plugin WhereUsed scored68%from 54 tests.

About plugin

  • Plugin page: where-used
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2022
  • Latest release: Jul 28, 2023
  • Number of updates: 40
  • Update frequency: every 9.5 days
  • Top authors: stevenayers63 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,306 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.68MB] [CPU: ▲8.46ms] Passed 4 tests

This is a short check of server-side resources used by WhereUsed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.92 ▲1.4653.47 ▲9.64
Dashboard /wp-admin5.05 ▲1.7556.25 ▲5.34
Posts /wp-admin/edit.php5.10 ▲1.7558.32 ▲9.04
Add New Post /wp-admin/post-new.php7.78 ▲1.89101.68 ▲9.81
Media Library /wp-admin/upload.php4.98 ▲1.7550.67 ▲12.45
WhereUsed /wp-admin/tools.php?page=where-used5.0344.44

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 83 new files
Database: 1 new table, 6 new options
New tables
wp_whereused_references
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WhereUsed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.74 ▼0.824.92 ▲2.7345.79 ▼7.45
Dashboard /wp-admin2,213 ▲285.86 ▲0.0096.35 ▼12.4239.03 ▼2.12
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0837.05 ▲3.4933.30 ▼4.62
Add New Post /wp-admin/post-new.php6,308 ▲4,77519.47 ▼3.83906.52 ▲203.1360.38 ▼6.70
Media Library /wp-admin/upload.php1,389 ▼24.24 ▲0.06104.89 ▲5.7541.76 ▼1.51
WhereUsed /wp-admin/tools.php?page=where-used1,2985.5659.9785.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_whereused_references
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/where-used/uninstall.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/tools.php?page=where-used
    • > Console-api (severe) in wp-content/plugins/where-used/library/js//chart.min.js+12:92809
    Failed to create chart: can't acquire context from the given item

Optimizations

Plugin configuration 96% from 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
5 plugin tags: seo, broken links, redirect, broken images, where used

where-used/where-used.php 92% from 13 tests

The main PHP script in "WhereUsed" version 1.4.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 195 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin10,289 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP473,7884,3528,765
CSS21679813
JavaScript6256258552
SVG111158
HTML2011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity38.92
▷ Minimum class complexity1.00
▷ Maximum class complexity170.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes35
▷ Abstract classes1234.29%
▷ Concrete classes2365.71%
▷ Final classes1252.17%
Methods388
▷ Static methods22758.51%
▷ Public methods31781.70%
▷ Protected methods4912.63%
▷ Private methods225.67%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants80
▷ Global constants80100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.33MB with 0.21MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png99.71KB34.83KB▼ 65.07%
screenshot-1.png149.91KB52.70KB▼ 64.85%
screenshot-3.png84.81KB28.64KB▼ 66.23%