73% bc-advance-search

Code Review | BigCommerce Advance Search

WordPress plugin BigCommerce Advance Search scored73%from 54 tests.

About plugin

  • Plugin page: bc-advance-search
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-5.5.1
  • WordPress version: 6.3.1
  • First release: May 11, 2019
  • Latest release: Oct 27, 2020
  • Number of updates: 6
  • Update frequency: every 90.7 days
  • Top authors: oudaryamayburai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /835 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼2.28ms] Passed 4 tests

Server-side resources used by BigCommerce Advance Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.68 ▲1.39
Dashboard /wp-admin3.56 ▲0.2642.56 ▼6.20
Posts /wp-admin/edit.php3.66 ▲0.3145.13 ▼0.03
Add New Post /wp-admin/post-new.php6.27 ▲0.3989.63 ▼4.23
Media Library /wp-admin/upload.php3.50 ▲0.2836.25 ▲1.33
Design Settings /wp-admin/admin.php?page=bas-design-settings3.4231.88
Promotion /wp-admin/admin.php?page=bas-promotion3.4229.25
BC Search /wp-admin/admin.php?page=bigcommerce-advance-search3.4230.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for BigCommerce Advance Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.21 ▼0.402.10 ▲0.4240.23 ▼5.31
Dashboard /wp-admin2,237 ▲575.65 ▲0.0784.82 ▼7.0876.45 ▲34.24
Posts /wp-admin/edit.php2,142 ▲422.02 ▲0.0840.26 ▲3.9338.83 ▲3.25
Add New Post /wp-admin/post-new.php1,561 ▲3323.04 ▼0.02676.49 ▼20.8948.95 ▼1.23
Media Library /wp-admin/upload.php1,445 ▲454.17 ▲0.0594.98 ▼23.5777.16 ▲29.59
Design Settings /wp-admin/admin.php?page=bas-design-settings9092.1826.4234.44
Promotion /wp-admin/admin.php?page=bas-promotion8692.1823.1037.03
BC Search /wp-admin/admin.php?page=bigcommerce-advance-search9212.0427.6042.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_bas_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 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 0% 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
Please take a closer look at the following
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/bc-advance-search/inc/debug.php
    • > /wp-content/plugins/bc-advance-search/inc/design-settings.php
    • > /wp-content/plugins/bc-advance-search/inc/widget.php
    • > /wp-content/plugins/bc-advance-search/inc/shortcode.php
    • > /wp-content/plugins/bc-advance-search/inc/ajax.php
    • > /wp-content/plugins/bc-advance-search/inc/promote/promote.php
    • > /wp-content/plugins/bc-advance-search/inc/settings.php
    • > /wp-content/plugins/bc-advance-search/inc/design-settings-public.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bc-advance-search/bc-advance-search.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bc-advance-search/inc/ajax-autocomplete.php:36

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=bas-design-settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/bc-advance-search/assets/js/admin-design-dynamic-script.js?ver=6.3.1 7:50 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration Passed 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
4 plugin tags: bigcommerce, wordpress, advance, search

bc-advance-search/bc-advance-search.php Passed 13 tests

"BigCommerce Advance Search" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
98 characters long description:
Most powerful, professional and advance search engine for ::: BigCommerce For WordPress ::: store.

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,224 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP11198126829
CSS43929309
Markdown117067
JavaScript321819

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.34
Average class complexity22.33
▷ Minimum class complexity5.00
▷ Maximum class complexity47.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/click-here.png1.25KB1.25KB0.00%
assets/img/bas-search-icon.png0.35KB0.53KB0.00%