78% advance-search-ajax

Code Review | Advance Ajax Live Search

WordPress plugin Advance Ajax Live Search scored 78% from 54 tests.

About plugin

  • Plugin page: advance-search-ajax
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 11, 2018
  • Latest release: Sep 21, 2018
  • Number of updates: 11
  • Update frequency: every 3.7 days
  • Top authors: yasintechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 824 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.19ms] Passed 4 tests

This is a short check of server-side resources used by Advance Ajax Live Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.49 ▼8.01
Dashboard /wp-admin3.33 ▲0.0247.14 ▼3.36
Posts /wp-admin/edit.php3.38 ▲0.0245.70 ▼5.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.27 ▼8.36
Media Library /wp-admin/upload.php3.25 ▲0.0236.01 ▲0.61
Search Setting /wp-admin/admin.php?page=search-setting3.2730.79
Contact Us /wp-admin/admin.php?page=about-us3.2130.34

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 14 new options
New WordPress options
e_cats
widget_recent-posts
e_tag
title
e_date
s_posts_per_page
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Advance Ajax Live Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲17913.58 ▼0.674.91 ▲2.6838.36 ▼7.40
Dashboard /wp-admin2,227 ▲425.85 ▲0.76103.93 ▼15.1084.36 ▲36.73
Posts /wp-admin/edit.php2,113 ▲242.06 ▲0.0232.69 ▼2.7033.13 ▼4.71
Add New Post /wp-admin/post-new.php1,535 ▲217.66 ▼5.33775.75 ▲192.1963.41 ▲12.18
Media Library /wp-admin/upload.php1,412 ▲274.23 ▲0.0396.02 ▼8.3574.30 ▲32.10
Search Setting /wp-admin/admin.php?page=search-setting9962.0326.6440.26
Contact Us /wp-admin/admin.php?page=about-us7982.0223.3924.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 14 options
    • e_tag
    • widget_recent-comments
    • s_posts_per_page
    • e_keyword
    • theysaidso_admin_options
    • e_cats
    • e_author
    • db_upgraded
    • e_date
    • title
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/advance-search-ajax/Advance-Search-Ajax.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/advance-search-ajax/loop.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/advance-search-ajax/setting.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/advance-search-ajax/process.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/advance-search-ajax/select.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This screen shot show a view of search form.), #2 (This screen shot show a view from the admin panel.)
You can look at the official readme.txt

advance-search-ajax/Advance-Search-Ajax.php 92% from 13 tests

The main PHP file in "Advance Ajax Live Search" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advance-search-ajax.php" instead of "Advance-Search-Ajax.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,028 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS36918529
PHP521095340
JavaScript24338159

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/search-me.png0.52KB0.35KB▼ 33.71%