78% custom-search-plugin

Code Review | Custom Search by BestWebSoft - Advanced WordPress Search Bar Plugin

WordPress plugin Custom Search by BestWebSoft - Advanced WordPress Search Bar Plugin scored78%from 54 tests.

About plugin

  • Plugin page: custom-search-plugin
  • Plugin version: 1.49
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Feb 22, 2012
  • Latest release: Oct 6, 2023
  • Number of updates: 80
  • Update frequency: every 53.1 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

1,000+ active /94,733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.86MB] [CPU: ▲4.96ms] Passed 4 tests

This is a short check of server-side resources used by Custom Search by BestWebSoft - Advanced WordPress Search Bar Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9049.49 ▲10.71
Dashboard /wp-admin4.19 ▲0.8954.74 ▲6.37
Posts /wp-admin/edit.php4.24 ▲0.8957.32 ▲8.57
Add New Post /wp-admin/post-new.php6.73 ▲0.85101.20 ▼4.21
Media Library /wp-admin/upload.php4.05 ▲0.8244.01 ▲9.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Search by BestWebSoft - Advanced WordPress Search Bar Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.96 ▼0.4111.75 ▲9.8643.03 ▲1.88
Dashboard /wp-admin2,234 ▲535.66 ▼0.0692.50 ▼6.5139.40 ▼2.94
Posts /wp-admin/edit.php2,136 ▲362.02 ▲0.0840.71 ▲4.9935.94 ▼3.07
Add New Post /wp-admin/post-new.php1,556 ▲2523.57 ▲0.16682.64 ▲52.2954.09 ▲2.72
Media Library /wp-admin/upload.php1,430 ▲304.20 ▼0.1197.54 ▼6.5742.45 ▼4.26
Settings /wp-admin/custom_search.php260.420.0712.56
BWS Panel /wp-admin/custom_search.php?page=cstmsrch-bws-panel260.420.125.98

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | 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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/custom-search-plugin/includes/class-cstmsrch-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-search-plugin/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-search-plugin/bws_menu/class-bws-settings.php:1453
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/custom-search-plugin/custom-search-plugin.php:800

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/custom_search.php
    • > Network (severe)
    wp-admin/custom_search.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/custom_search.php?page=cstmsrch-bws-panel
    • > Network (severe)
    wp-admin/custom_search.php?page=cstmsrch-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Custom Search Settings page.), #2 (Custom Search Appearance page.), #3 (Custom Search Display page.), #4 (Search results displayed by tabs.)
You can look at the official readme.txt

custom-search-plugin/custom-search-plugin.php Passed 13 tests

The main PHP file in "Custom Search by BestWebSoft - Advanced WordPress Search Bar Plugin" ver. 1.49 adds more information about the plugin and also serves as the entry point for this plugin
58 characters long description:
Add custom post types to WordPress website search results.

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
No dangerous file extensions were detected23,450 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PO File164,9248,63312,153
CSS91542565,348
PHP95216075,259
JavaScript627110523
SVG400167

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity93.33
▷ Minimum class complexity21.00
▷ Maximum class complexity210.00
Average method complexity11.26
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2177.78%
▷ Protected methods00.00%
▷ Private methods622.22%
Functions77
▷ Named functions77100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
66 PNG files occupy 3.75MB with 1.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pro_screen_1.png205.09KB64.87KB▼ 68.37%
screenshot-1.png121.63KB46.35KB▼ 61.89%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.32KB0.21KB▼ 34.34%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_2e83ff_256x240.png4.49KB4.20KB▼ 6.46%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%