79% wp-bing-search

Code Review | Bing Custom Search for WordPress

WordPress plugin Bing Custom Search for WordPress scored79%from 54 tests.

About plugin

  • Plugin page: wp-bing-search
  • Plugin version: 2.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Aug 11, 2017
  • Latest release: Jul 13, 2023
  • Number of updates: 243
  • Update frequency: every 9.0 days
  • Top authors: sbruner (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /6,207 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
This plugin's installer ran successfully

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

Server-side resources used by Bing Custom Search for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.41 ▼13.20
Dashboard /wp-admin3.32 ▲0.0245.33 ▼0.70
Posts /wp-admin/edit.php3.37 ▲0.0145.65 ▼1.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.43 ▲11.05
Media Library /wp-admin/upload.php3.24 ▲0.0136.01 ▲2.63
Bing Search /wp-admin/options-general.php?page=wp_bing_search3.1827.93

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Bing Custom Search for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲5213.36 ▼0.874.28 ▲2.3039.42 ▼0.28
Dashboard /wp-admin2,215 ▲244.84 ▼0.03111.77 ▲2.5147.10 ▲5.24
Posts /wp-admin/edit.php2,097 ▲82.02 ▲0.0239.50 ▲3.6635.16 ▲1.98
Add New Post /wp-admin/post-new.php1,541 ▲823.17 ▲0.04593.44 ▼47.5255.86 ▲2.43
Media Library /wp-admin/upload.php1,394 ▲94.22 ▼0.0198.34 ▲2.0943.72 ▲0.59
Bing Search /wp-admin/options-general.php?page=wp_bing_search1,6669.18274.8673.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wp_bing_search
    • > Notice in wp-content/plugins/wp-bing-search/includes/wp_bing_search_settings.php+269
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'wp_bing_search' not found in wp-content/plugins/wp-bing-search/parts/shared/tab-header.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function piklist() in wp-content/plugins/wp-bing-search/parts/settings/main-settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-bing-search/includes/wp_bing_search_tabs.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-bing-search/includes/wp_bing_search_theme_compatibility.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-bing-search/includes/wp_bing_search_settings.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: advanced search, custom search, search, better search, bing

wp-bing-search/wp-bing-search.php Passed 13 tests

The entry point to "Bing Custom Search for WordPress" version 2.6.3 is a PHP file that has certain tags in its header comment area
32 characters long description:
Bing Custom Search for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,165 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP7382454661
XML500305
PO File35763186
CSS21013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.75
▷ Minimum class complexity5.00
▷ Maximum class complexity30.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods50
▷ Static methods50100.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin