100% better-search-replace

Code Review | Better Search Replace

WordPress plugin Better Search Replace scored 100% from 54 tests.

About plugin

  • Plugin page: better-search-rep...
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 5.9.2
  • First release: Jan 6, 2015
  • Latest release: Jan 25, 2022
  • Number of updates: 78
  • Update frequency: every 33.0 days
  • Top authors: mattshaw (50%)ExpandedFronts (32.05%)deliciousbrains (20.51%)

Code review

54 tests

User reviews

455 reviews

Install metrics

1,000,000+ active / 6,112,832 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼325.61ms] Passed 4 tests

This is a short check of server-side resources used by Better Search Replace
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2360.40 ▲0.60
Dashboard /wp-admin3.58 ▲0.1737.73 ▼41.51
Posts /wp-admin/edit.php3.81 ▲0.1740.48 ▼0.80
Add New Post /wp-admin/post-new.php7.05 ▲0.0797.13 ▼1,260.72
Media Library /wp-admin/upload.php3.46 ▲0.1628.31 ▲3.54
Better Search Replace /wp-admin/tools.php?page=better-search-replace3.4764.94

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Better Search Replace
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4615.85 ▼0.226.08 ▼0.392.64 ▼0.03
Dashboard /wp-admin2,897 ▲366.09 ▼0.10123.96 ▼12.06204.22 ▲38.34
Posts /wp-admin/edit.php2,693 ▼13.22 ▼0.0063.34 ▼2.81169.75 ▲22.24
Add New Post /wp-admin/post-new.php1,692 ▲220.78 ▼0.25430.12 ▼14.07161.36 ▼90.48
Media Library /wp-admin/upload.php1,703 ▲55.51 ▼0.05148.59 ▲1.93198.96 ▼54.13
Better Search Replace /wp-admin/tools.php?page=better-search-replace1,4912.5856.68171.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: search replace database, searchreplace, database, search replace, better search replace...

better-search-replace/better-search-replace.php Passed 13 tests

"Better Search Replace" version 1.3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
A small plugin for running a search/replace on your WordPress database.

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 plugin1,337 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PO File38392310

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.71
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods817.02%
▷ Public methods4391.49%
▷ Protected methods00.00%
▷ Private methods48.51%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/css/images/ui-bg_glass_100_f6f6f6_1x400.png0.26KB0.12KB▼ 53.44%
assets/css/images/ui-icons_228ef1_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%
assets/img/sidebar-upgrade.png9.95KB9.00KB▼ 9.52%