84% wp-fix-search-function-search-only-posts

Code Review | WP - Fix search function [search only posts]

WordPress plugin WP - Fix search function [search only posts] scored 84% from 54 tests.

About plugin

  • Plugin page: wp-fix-search-fun...
  • Plugin version: 1.4.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 23, 2019
  • Latest release: Apr 13, 2020
  • Number of updates: 21
  • Update frequency: every 19.8 days
  • Top authors: yvisherve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 926 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
Installer ran successfully

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

Server-side resources used by WP - Fix search function [search only posts]
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.85 ▼6.52
Dashboard /wp-admin3.31 ▲0.0050.41 ▼7.30
Posts /wp-admin/edit.php3.36 ▲0.0052.55 ▲0.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.34 ▲0.93
Media Library /wp-admin/upload.php3.23 ▲0.0041.73 ▲6.88

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP - Fix search function [search only posts]
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.52 ▲0.304.83 ▲2.9842.94 ▼3.87
Dashboard /wp-admin2,206 ▼04.90 ▼0.94106.70 ▼8.6838.61 ▼2.82
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0439.81 ▲4.2234.62 ▲4.52
Add New Post /wp-admin/post-new.php1,514 ▼1917.41 ▼5.72679.45 ▼6.6459.51 ▲5.16
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.04100.95 ▲0.8244.09 ▼0.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-fix-search-function-search-only-posts/index.php:21

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: posts, users, post, search

wp-fix-search-function-search-only-posts/index.php 92% from 13 tests

The principal PHP file in "WP - Fix search function [search only posts]" v. 1.4.9 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-fix-search-function-search-only-posts.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13810

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin