83% search-and-replace-text

Code Review | Search and Replace Text

WordPress plugin Search and Replace Text scored83%from 54 tests.

About plugin

  • Plugin page: search-and-replac...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4
  • WordPress version: 6.3.1
  • First release: Mar 7, 2020
  • Latest release: Mar 9, 2020
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: nabeeltahir12 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /3,073 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: ▼5.65ms] Passed 4 tests

Analyzing server-side resources used by Search and Replace Text
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.80 ▼7.56
Dashboard /wp-admin3.32 ▲0.0244.56 ▼10.67
Posts /wp-admin/edit.php3.38 ▲0.0249.06 ▼0.60
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.36 ▼3.76
Media Library /wp-admin/upload.php3.25 ▲0.0236.76 ▲1.75
Search and Replace Text /wp-admin/tools.php?page=fnrt-wp3.2333.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Search and Replace Text
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.38 ▲0.181.75 ▼0.3241.03 ▼8.34
Dashboard /wp-admin2,209 ▲245.78 ▼0.0795.21 ▼2.6440.59 ▼2.94
Posts /wp-admin/edit.php2,095 ▲62.03 ▲0.0341.15 ▲5.0736.09 ▲0.44
Add New Post /wp-admin/post-new.php1,519 ▲523.24 ▲5.73593.51 ▼105.0863.44 ▲3.06
Media Library /wp-admin/upload.php1,394 ▲94.30 ▲0.0297.54 ▼16.8943.91 ▼2.25
Search and Replace Text /wp-admin/tools.php?page=fnrt-wp7862.0425.1025.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_pages() in wp-content/plugins/search-and-replace-text/js/dynmicjs.php:5

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: rtsearchreplace, fnrt

search-and-replace-text/real-time-find-and-replace.php 77% from 13 tests

The principal PHP file in "Search and Replace Text" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("search-and-replace-text.php" instead of "real-time-find-and-replace.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 328 characters long)

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
Good job! No executable or dangerous file extensions detected889 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS150750
PHP32223139

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for 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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin