10% fancy-search

Code Review | Fancy Search

WordPress plugin Fancy Search scored10%from 54 tests.

About plugin

  • Plugin page: fancy-search
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Sep 1, 2016
  • Latest release: Sep 5, 2016
  • Number of updates: 8
  • Update frequency: every 0.5 days
  • Top authors: Vanduy99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,496 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.42MB] [CPU: ▼5.60ms] Passed 4 tests

This is a short check of server-side resources used by Fancy Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4439.42 ▼0.90
Dashboard /wp-admin3.72 ▲0.4146.90 ▼4.25
Posts /wp-admin/edit.php3.84 ▲0.4847.74 ▲0.91
Add New Post /wp-admin/post-new.php6.32 ▲0.4382.24 ▼18.16
Media Library /wp-admin/upload.php3.65 ▲0.4137.88 ▲5.85
Fancy Search /wp-admin/admin.php?page=fancy-search3.5932.16
Add-ons /wp-admin/admin.php?page=Fancy_Search_Callback_Addons3.5932.58
Documentation /wp-admin/admin.php?page=Fancy_Search_Callback_Documentation3.6130.18

Server storage [IO: ▲2.63MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • The plugin illegally modified 2 files (1.70KB) outside of "wp-content/plugins/fancy-search/" and "wp-content/uploads/"
    • (modified) wp-content/themes/twentytwentyone/search.php
    • (new file) wp-content/themes/twentytwentyone/search-fancy-copy.php
Filesystem: 58 new files
Database: 2 new tables, 7 new options
New tables
wp_fancysearch
wp_autosuggest
New WordPress options
db_upgraded
Fancy_Search_version
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Fancy Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲17714.07 ▼0.314.74 ▲3.0538.79 ▼4.19
Dashboard /wp-admin2,239 ▲485.83 ▲0.9594.88 ▼9.9375.28 ▲32.02
Posts /wp-admin/edit.php2,122 ▲302.06 ▲0.0334.48 ▼6.3533.38 ▼2.68
Add New Post /wp-admin/post-new.php1,698 ▲17922.41 ▼1.03652.05 ▼16.5241.88 ▼6.38
Media Library /wp-admin/upload.php1,427 ▲424.26 ▲0.05111.53 ▲12.3244.08 ▲1.92
Fancy Search /wp-admin/admin.php?page=fancy-search2,1052.1825.2258.24
Add-ons /wp-admin/admin.php?page=Fancy_Search_Callback_Addons8422.0726.1528.99
Documentation /wp-admin/admin.php?page=Fancy_Search_Callback_Documentation1,0282.1629.2141.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • Fancy_Search_version
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Fancy_Search_Callback_Addons
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Fancy_Search_Callback_Addons
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: post search, advanced search, page search, search form, search...

fancy-search/fancy-search.php 92% from 13 tests

The principal PHP file in "Fancy Search" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 330 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin28,611 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
HTML11213,061
CSS93825018,484
JavaScript123562993,654
PHP114195792,772
SVG100640

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.43
Average class complexity45.80
▷ Minimum class complexity7.00
▷ Maximum class complexity162.00
Average method complexity9.43
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2083.33%
▷ Protected methods00.00%
▷ Private methods416.67%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/warning.png1.71KB0.86KB▼ 49.89%
assets/img/screenshot-7.png19.23KB18.70KB▼ 2.76%
assets/img/screenshot-6.png18.90KB18.42KB▼ 2.59%
assets/img/screenshot-5.png26.44KB25.73KB▼ 2.68%
assets/img/icon-17.png3.63KB0.82KB▼ 77.39%