84% abbs-bing-search

Code Review | Bing Search API Integration

WordPress plugin Bing Search API Integration scored84%from 54 tests.

About plugin

  • Plugin page: abbs-bing-search
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 18, 2017
  • Latest release: Jul 4, 2017
  • Number of updates: 17
  • Update frequency: every 4.8 days
  • Top authors: askewbrook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,976 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Bing Search API Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.68 ▼7.59
Dashboard /wp-admin3.33 ▲0.0343.52 ▼2.93
Posts /wp-admin/edit.php3.38 ▲0.0347.52 ▲0.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.57 ▲1.27
Media Library /wp-admin/upload.php3.25 ▲0.0234.97 ▲1.61
Bing Search /wp-admin/options-general.php?page=abbs_bing_search_options3.2832.66

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Bing Search API Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲10013.28 ▼1.102.10 ▼0.2040.85 ▼3.39
Dashboard /wp-admin2,227 ▲424.84 ▲0.01111.12 ▼8.4443.34 ▼0.99
Posts /wp-admin/edit.php2,110 ▲212.01 ▼0.0040.25 ▲0.8835.54 ▼0.46
Add New Post /wp-admin/post-new.php1,536 ▲723.16 ▲4.69612.83 ▼57.4361.35 ▼6.04
Media Library /wp-admin/upload.php1,412 ▲244.21 ▲0.0598.15 ▼6.7745.82 ▲1.68
Bing Search /wp-admin/options-general.php?page=abbs_bing_search_options1,1912.0827.2828.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/abbs-bing-search/abbs-bing-search.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/abbs-bing-search/bing-search-template.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Requires at least: Version format is invalid
You can take inspiration from this readme.txt

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

The main PHP script in "Bing Search API Integration" version 0.3.3 is automatically included on every request by WordPress
66 characters long description:
Override your wordpress search functionality with Bing Search API.

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
No dangerous file extensions were detected772 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP46633592
PO File45252180

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
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