84% search-replace

Code Review | Search and Replace

WordPress plugin Search and Replace scored 84% from 54 tests.

About plugin

  • Plugin page: search-replace
  • Plugin version: 1.35
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Jul 31, 2023
  • Number of updates: 40
  • Update frequency: every 68.4 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

10,000+ active / 170,547 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.23ms] Passed 4 tests

An overview of server-side resources used by Search and Replace
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.02 ▼1.98
Dashboard /wp-admin3.32 ▲0.0248.28 ▼0.61
Posts /wp-admin/edit.php3.37 ▲0.0245.51 ▼0.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.12 ▼14.28
Media Library /wp-admin/upload.php3.25 ▲0.0241.24 ▲2.96

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

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

Browser metrics Passed 4 tests

Search and Replace: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7814.78 ▲0.491.86 ▲0.0843.98 ▼1.75
Dashboard /wp-admin2,207 ▲165.85 ▼0.05113.95 ▲8.1663.08 ▲19.44
Posts /wp-admin/edit.php2,102 ▲132.02 ▲0.0036.30 ▲0.7233.60 ▲1.58
Add New Post /wp-admin/post-new.php1,679 ▲14622.55 ▼0.72709.65 ▲108.9264.15 ▲13.94
Media Library /wp-admin/upload.php1,401 ▲164.19 ▼0.0894.67 ▼20.5276.67 ▲27.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-replace/search-replace.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

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
8 plugin tags: post, find and replace, search and replace, content, page...

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

The main file in "Search and Replace" v. 1.35 serves as a complement to information provided in readme.txt and as the entry point to the plugin
43 characters long description:
Search and replace into any pages and posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin98 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2321382
CSS12016

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.16MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/search-and-replace-pro.png163.59KB54.58KB▼ 66.63%
images/icon.png0.77KB0.84KB0.00%
images/fb.png1.59KB1.00KB▼ 37.42%