10% better-wp-search

Code Review | Better WP Search

WordPress plugin Better WP Search scored10%from 54 tests.

About plugin

  • Plugin page: better-wp-search
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Feb 10, 2016
  • Latest release: May 26, 2019
  • Number of updates: 6
  • Update frequency: every 200.0 days
  • Top authors: bhimpfen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,030 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/better-wp-search/better-wp-search.php+44
    Undefined variable: wp_version

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.03ms] Passed 4 tests

Analyzing server-side resources used by Better WP Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.97 ▲0.01
Dashboard /wp-admin3.31 ▲0.0047.92 ▼6.14
Posts /wp-admin/edit.php3.36 ▲0.0051.87 ▼4.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.52 ▼9.91
Media Library /wp-admin/upload.php3.23 ▲0.0036.20 ▲0.58

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Better WP Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.07 ▼0.281.82 ▼0.0946.93 ▲2.10
Dashboard /wp-admin2,195 ▲215.61 ▼0.0487.96 ▼16.3543.16 ▼1.93
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0535.07 ▼1.7433.86 ▼4.12
Add New Post /wp-admin/post-new.php1,529 ▲323.25 ▼0.46622.04 ▼57.8052.41 ▼13.47
Media Library /wp-admin/upload.php1,397 ▼34.15 ▼0.0797.09 ▼13.2846.26 ▼0.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-wp-search/better-wp-search.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: seo, search

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

The main PHP file in "Better WP Search" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
69 characters long description:
Better WP Search improves the default WordPress search functionality.

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
There were no executable files found in this plugin30 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP151629
Markdown1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.17
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected