10% brainy-search

Code Review | BrainySearch

WordPress plugin BrainySearch scored10%from 54 tests.

About plugin

  • Plugin page: brainy-search
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2023
  • Latest release: Mar 22, 2023
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: procoders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /333 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.99ms] Passed 4 tests

Server-side resources used by BrainySearch
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.07 ▼6.15
Dashboard /wp-admin3.34 ▲0.0351.73 ▼0.43
Posts /wp-admin/edit.php3.39 ▲0.0349.12 ▼2.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0399.07 ▼6.45
Media Library /wp-admin/upload.php3.26 ▲0.0337.14 ▲2.28
BrainySearch /wp-admin/options-general.php?page=brainy-search3.2335.95

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for BrainySearch
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.43 ▼0.192.06 ▲0.4042.40 ▼2.94
Dashboard /wp-admin2,202 ▲225.52 ▼0.1386.97 ▼4.4944.21 ▲2.91
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0436.01 ▲0.5336.19 ▼3.99
Add New Post /wp-admin/post-new.php1,529 ▲322.98 ▼0.10676.60 ▲58.7954.82 ▲3.47
Media Library /wp-admin/upload.php1,401 ▼24.22 ▼0.01101.69 ▲2.2545.03 ▲2.54
BrainySearch /wp-admin/options-general.php?page=brainy-search1,0982.0122.7928.33

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/brainy-search/src/clusters.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/brainy-search/partials/brainy-search-form.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/brainy-search/brainy-search.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/brainy-search/partials/brainy-search-results.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #3 (Output results based on your posts content) image required
You can look at the official readme.txt

brainy-search/brainy-search.php Passed 13 tests

The main PHP file in "BrainySearch" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
57 characters long description:
AI Search to power a search engine on your WordPress site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin860 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP410587716
Markdown3720120
CSS13024

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions36
▷ Named functions3597.22%
▷ Anonymous functions12.78%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin