84% simple-autocomplete-search

Code Review | Simple Autocomplete Search

WordPress plugin Simple Autocomplete Search scored84%from 54 tests.

About plugin

  • Plugin page: simple-autocomple...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.3
  • WordPress version: 6.3.1
  • First release: Sep 3, 2015
  • Latest release: Sep 3, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kinghippo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /765 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.01MB] [CPU: ▼6.95ms] Passed 4 tests

An overview of server-side resources used by Simple Autocomplete Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0248.65 ▲9.13
Dashboard /wp-admin3.37 ▼0.0249.43 ▼15.21
Posts /wp-admin/edit.php3.42 ▲0.0251.77 ▼1.75
Add New Post /wp-admin/post-new.php5.95 ▲0.0297.19 ▼7.97
Media Library /wp-admin/upload.php3.29 ▲0.0236.56 ▼2.88
City Population /wp-admin/options-general.php?page=jquery-autocomplete-search3.2635.68

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Simple Autocomplete Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲15713.53 ▼0.6310.22 ▲8.4940.09 ▲0.80
Dashboard /wp-admin2,192 ▲155.56 ▼0.1186.92 ▼15.0937.44 ▼8.14
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0139.53 ▲1.9338.23 ▲1.61
Add New Post /wp-admin/post-new.php1,376 ▼15216.60 ▼6.74585.86 ▼137.5545.80 ▼14.70
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.1599.01 ▼15.6641.04 ▼7.81
City Population /wp-admin/options-general.php?page=jquery-autocomplete-search8161.9726.5832.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-autocomplete-search/simple-autocomplete-search.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/simple-autocomplete-search/search.php:6
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/simple-autocomplete-search/search.php on line 6
    • > PHP Notice
      Undefined index: searchbt in wp-content/plugins/simple-autocomplete-search/search.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
3 plugin tags: mysql, jquery, search

simple-autocomplete-search/simple-autocomplete-search.php Passed 13 tests

The main PHP script in "Simple Autocomplete Search" version 1.0 is automatically included on every request by WordPress
49 characters long description:
An autocomplete plugin for WordPress using Jquery

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
Good job! No executable or dangerous file extensions detected145 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24637145

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.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%
Functions8
▷ Named functions8100.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 images were found in this plugin