10% bravo-search-and-replace

Code Review | Bravo Search & Replace

WordPress plugin Bravo Search & Replace scored10%from 54 tests.

About plugin

  • Plugin page: bravo-search-and-...
  • Plugin version: 1.0
  • PHP compatiblity: 4.0.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.7
  • WordPress version: 6.3.1
  • First release: May 3, 2021
  • Latest release: May 3, 2021
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: guelben (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /777 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/bravo-search-and-replace/activation.php+23
    Trying to get property 'num_rows' of non-object

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.79ms] Passed 4 tests

An overview of server-side resources used by Bravo Search & Replace
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.77 ▼1.33
Dashboard /wp-admin3.31 ▲0.0150.92 ▼1.42
Posts /wp-admin/edit.php3.36 ▲0.0151.65 ▼3.35
Add New Post /wp-admin/post-new.php5.90 ▲0.02100.79 ▼1.35
Media Library /wp-admin/upload.php3.24 ▲0.0134.93 ▼5.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: 1 new table, 7 new options
New tables
wp_bravo_sp
New WordPress options
BRAVOSP_notice
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bravo Search & Replace
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.25 ▼1.492.01 ▲0.1142.27 ▲2.23
Dashboard /wp-admin2,225 ▲374.87 ▼0.1699.13 ▼4.7439.28 ▼4.37
Posts /wp-admin/edit.php2,105 ▲162.00 ▼0.0040.33 ▼1.8035.31 ▼2.80
Add New Post /wp-admin/post-new.php1,555 ▲4118.44 ▲0.83615.84 ▲6.8550.57 ▼0.21
Media Library /wp-admin/upload.php1,404 ▲194.21 ▲0.02101.76 ▼7.6547.33 ▲0.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

bravo-search-and-replace/bravo-search-and-replace.php 85% from 13 tests

The primary PHP file in "Bravo Search & Replace" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 174 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin485 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP711570374
JavaScript14092
CSS10019

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants2
▷ Global constants2100.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
No PNG files were detected