78% search-regex

Code Review | Search Regex

WordPress plugin Search Regex scored78%from 54 tests.

About plugin

  • Plugin page: search-regex
  • Plugin version: 3.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Sep 17, 2007
  • Latest release: Sep 10, 2023
  • Number of updates: 77
  • Update frequency: every 76.0 days
  • Top authors: johnny5 (100%)

Code review

54 tests

User reviews

87 reviews

Install metrics

200,000+ active /1,624,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
Install script ran successfully

Server metrics [RAM: ▲1.22MB] [CPU: ▼1.24ms] Passed 4 tests

This is a short check of server-side resources used by Search Regex
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.80 ▼3.14
Dashboard /wp-admin4.94 ▲1.6355.10 ▲3.83
Posts /wp-admin/edit.php4.99 ▲1.6358.00 ▲10.70
Add New Post /wp-admin/post-new.php7.51 ▲1.6288.20 ▼16.34
Media Library /wp-admin/upload.php4.80 ▲1.5755.29 ▲12.65

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 124 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Search Regex: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.25 ▼0.994.33 ▲2.4643.43 ▼4.71
Dashboard /wp-admin2,213 ▲256.06 ▲0.20106.08 ▼11.8840.59 ▼4.38
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0537.43 ▲1.1334.30 ▼1.29
Add New Post /wp-admin/post-new.php1,545 ▲2418.05 ▼5.12659.12 ▼14.5562.20 ▼4.60
Media Library /wp-admin/upload.php1,392 ▲74.39 ▲0.1995.97 ▼16.9341.29 ▼4.15
Search Regex /wp-admin/search-regex.php260.440.1112.33

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 detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 57× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Sql\\Join\\Join' not found in wp-content/plugins/search-regex/includes/sql/join/join-meta.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Sql\\Join\\Join' not found in wp-content/plugins/search-regex/includes/sql/join/join-user.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Action\\Action' not found in wp-content/plugins/search-regex/includes/action/action-delete.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Sql\\Join\\Join' not found in wp-content/plugins/search-regex/includes/sql/join/join-taxonomy.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Filter\\Type\\Filter_Type' not found in wp-content/plugins/search-regex/includes/filter/filter-integer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Filter\\Type\\Filter_Type' not found in wp-content/plugins/search-regex/includes/filter/filter-string.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Context\\Type\\Value' not found in wp-content/plugins/search-regex/includes/context/context-add.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Sql\\Where\\Where' not found in wp-content/plugins/search-regex/includes/sql/where/where-or.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Action\\Type\\Modify' not found in wp-content/plugins/search-regex/includes/action/action-global-replace.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SearchRegex\\Source\\Source' not found in wp-content/plugins/search-regex/includes/source/core/source-user.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/search-regex.php
    • > Network (severe)
    wp-admin/search-regex.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
7 plugin tags: search, page, regex, post, database...

search-regex/search-regex.php 92% from 13 tests

The main PHP file in "Search Regex" ver. 3.0.7 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/locale" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected11,630 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
PHP962,1624,4887,355
PO File62,0422,2644,220
CSS10035
JavaScript101011
JSON6006
Markdown1103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.53
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces23
Interfaces0
Traits2
Classes92
▷ Abstract classes88.70%
▷ Concrete classes8491.30%
▷ Final classes00.00%
Methods682
▷ Static methods456.60%
▷ Public methods58786.07%
▷ Protected methods284.11%
▷ Private methods679.82%
Functions65
▷ Named functions46.15%
▷ Anonymous functions6193.85%
Constants54
▷ Global constants47.41%
▷ Class constants5092.59%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/GitHub-Mark-64px.png2.56KB1.51KB▼ 41.07%