84% string-locator

Code Review | String locator

WordPress plugin String locator scored84%from 54 tests.

About plugin

  • Plugin page: string-locator
  • Plugin version: 2.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2013
  • Latest release: Aug 10, 2023
  • Number of updates: 113
  • Update frequency: every 32.3 days
  • Top authors: Clorith (98.23%)instawp (2.65%)

Code review

54 tests

User reviews

115 reviews

Install metrics

100,000+ active /920,947 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▼2.25ms] Passed 4 tests

A check of server-side resources used by String locator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.5939.92 ▼0.55
Dashboard /wp-admin3.89 ▲0.5949.99 ▼2.29
Posts /wp-admin/edit.php3.94 ▲0.5949.56 ▼3.60
Add New Post /wp-admin/post-new.php6.42 ▲0.5486.82 ▼2.57
Media Library /wp-admin/upload.php3.75 ▲0.5338.31 ▼0.16
String Locator /wp-admin/tools.php?page=string-locator3.7834.56

Server storage [IO: ▲0.16MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for String locator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.121.74 ▼0.1040.35 ▼5.73
Dashboard /wp-admin2,202 ▲255.64 ▲0.0387.50 ▼7.6236.68 ▼2.19
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0035.98 ▼3.1932.36 ▼2.86
Add New Post /wp-admin/post-new.php1,530 ▲423.04 ▲0.02610.15 ▼60.9456.02 ▲1.47
Media Library /wp-admin/upload.php1,398 ▼24.25 ▲0.0599.06 ▼7.7441.75 ▼7.15
String Locator /wp-admin/tools.php?page=string-locator1,1141.9334.6623.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function StringLocator\\Extensions\\SQL\\Tests\\add_action() in wp-content/plugins/string-locator/includes/Extension/SQL/Tests/class-serialized-data.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'StringLocator\\Base\\Search' not found in wp-content/plugins/string-locator/includes/Extension/SQL/class-search.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'StringLocator\\Base\\REST' not found in wp-content/plugins/string-locator/includes/REST/class-clean.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'StringLocator\\Base\\REST' not found in wp-content/plugins/string-locator/includes/REST/class-save.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function StringLocator\\Extension\\SQL\\add_filter() in wp-content/plugins/string-locator/includes/Extension/SQL/class-save.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function StringLocator\\Extension\\SearchReplace\\add_action() in wp-content/plugins/string-locator/includes/Extension/SearchReplace/class-replace.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'StringLocator\\Base\\Search' not found in wp-content/plugins/string-locator/includes/Extension/SQL/class-search.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'StringLocator\\Base\\Search' not found in wp-content/plugins/string-locator/includes/class-search.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'StringLocator\\Base\\REST' not found in wp-content/plugins/string-locator/includes/Extension/SearchReplace/REST/class-replace.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/string-locator/includes/Base/class-rest.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: text, find, highlight, syntax, search

string-locator/string-locator.php Passed 13 tests

"String locator" version 2.6.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
Scan through theme and plugin files looking for text strings

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin3,072 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP367319923,054
SVG10012
JavaScript4004
CSS2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.55
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods121
▷ Static methods1310.74%
▷ Public methods11292.56%
▷ Protected methods00.00%
▷ Private methods97.44%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin