87% search-and-replace

Code Review | Search & Replace

WordPress plugin Search & Replace scored 87% from 54 tests.

About plugin

  • Plugin page: search-and-replace
  • Plugin version: 3.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 5.8.1
  • First release: May 14, 2007
  • Latest release: Jun 6, 2019
  • Number of updates: 165
  • Update frequency: every 26.7 days
  • Top authors: Bueltge (81.82%)derpixler (18.18%)vanvox (1.21%)

Code review

54 tests

User reviews

260 reviews

Install metrics

200,000+ active / 2,531,743 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▼139.72ms] Passed 4 tests

This is a short check of server-side resources used by Search & Replace
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1344.10 ▲22.51
Dashboard /wp-admin3.50 ▲0.4560.87 ▲12.76
Posts /wp-admin/edit.php3.55 ▲0.4447.98 ▲0.76
Add New Post /wp-admin/post-new.php5.80 ▲0.3793.10 ▼567.47
Media Library /wp-admin/upload.php3.45 ▲0.4435.30 ▼4.93
Search & Replace /wp-admin/tools.php?page=sql-import3.3532.39
Search & Replace /wp-admin/tools.php?page=search-replace3.3847.78
Search & Replace /wp-admin/tools.php?page=backup-database3.3526.93
Search & Replace /wp-admin/tools.php?page=credits3.3730.76
Search & Replace /wp-admin/tools.php?page=replace-domain-url3.3626.78

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Search & Replace
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.06 ▲0.349.72 ▼0.2850.45 ▲3.33
Dashboard /wp-admin2,975 ▲415.94 ▲0.00148.27 ▼8.08107.96 ▼7.26
Posts /wp-admin/edit.php2,744 ▲52.71 ▲0.0174.62 ▲11.0086.91 ▲3.62
Add New Post /wp-admin/post-new.php1,607 ▲2618.84 ▲1.33395.02 ▼18.82108.03 ▼11.68
Media Library /wp-admin/upload.php1,812 ▲55.01 ▼0.02154.82 ▼46.70118.25 ▼23.22
Search & Replace /wp-admin/tools.php?page=sql-import1,0842.3054.6279.09
Search & Replace /wp-admin/tools.php?page=search-replace1,3092.3358.5275.34
Search & Replace /wp-admin/tools.php?page=backup-database1,0402.0555.4367.29
Search & Replace /wp-admin/tools.php?page=credits1,1532.1161.7783.09
Search & Replace /wp-admin/tools.php?page=replace-domain-url1,1712.1054.7778.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/search-and-replace/inpsyde-search-replace.php
    • > /wp-content/plugins/search-and-replace/inc/templates/credits.php
    • > /wp-content/plugins/search-and-replace/inc/templates/db-backup.php
    • > /wp-content/plugins/search-and-replace/inc/templates/search-replace.php
    • > /wp-content/plugins/search-and-replace/inc/templates/sql-import.php
    • > /wp-content/plugins/search-and-replace/inc/templates/replace-domain.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Inpsyde\\SearchReplace\\Page\\AbstractPage' not found in wp-content/plugins/search-and-replace/inc/Page/BackupDatabase.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Inpsyde\\SearchReplace\\Page\\AbstractPage' not found in wp-content/plugins/search-and-replace/inc/Page/Credits.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Semver\\Constraint\\ConstraintInterface' not found in wp-content/plugins/search-and-replace/vendor/composer/semver/src/Constraint/Constraint.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Semver\\Constraint\\ConstraintInterface' not found in wp-content/plugins/search-and-replace/vendor/composer/semver/src/Constraint/AbstractConstraint.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Semver\\Constraint\\ConstraintInterface' not found in wp-content/plugins/search-and-replace/vendor/composer/semver/src/Constraint/EmptyConstraint.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Inpsyde\\SearchReplace\\Page\\AbstractPage' not found in wp-content/plugins/search-and-replace/inc/Page/SearchReplace.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Semver\\Constraint\\ConstraintInterface' not found in wp-content/plugins/search-and-replace/vendor/composer/semver/src/Constraint/MultiConstraint.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Inpsyde\\SearchReplace\\Page\\AbstractPage' not found in wp-content/plugins/search-and-replace/inc/Page/SqlImport.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Inpsyde\\SearchReplace\\Page\\AbstractPage' not found in wp-content/plugins/search-and-replace/inc/Page/ReplaceDomain.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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 require attention: The official readme.txt is a good inspiration

search-and-replace/inpsyde-search-replace.php 77% from 13 tests

This is the main PHP file of "Search & Replace" version 3.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("search-and-replace.php" instead of "inpsyde-search-replace.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin5,689 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP399561,9123,445
JSON3002,081
CSS220499
JavaScript2251364

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity19.31
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces8
Interfaces2
Traits0
Classes27
▷ Abstract classes27.41%
▷ Concrete classes2592.59%
▷ Final classes00.00%
Methods216
▷ Static methods2511.57%
▷ Public methods16174.54%
▷ Protected methods104.63%
▷ Private methods4520.83%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants22
▷ Global constants14.55%
▷ Class constants2195.45%
▷ Public constants21100.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
No PNG files were detected