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: 5.9.2
  • 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 / 593 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Advance Ajax Live Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0754.87 ▲7.31
Dashboard /wp-admin3.46 ▲0.0532.70 ▼0.46
Posts /wp-admin/edit.php3.68 ▲0.0436.95 ▲2.43
Add New Post /wp-admin/post-new.php6.93 ▼0.0593.45 ▼1,172.59
Media Library /wp-admin/upload.php3.34 ▲0.0424.03 ▲0.13
Search Setting /wp-admin/admin.php?page=search-setting3.3222.83
Contact Us /wp-admin/admin.php?page=about-us3.3022.96

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Advance Ajax Live Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,934 ▲18016.39 ▲0.6110.10 ▲3.962.33 ▼0.11
Dashboard /wp-admin2,924 ▲636.33 ▼0.06121.07 ▼14.02180.59 ▲17.40
Posts /wp-admin/edit.php2,689 ▼23.34 ▼0.1065.78 ▲3.25142.09 ▼4.28
Add New Post /wp-admin/post-new.php1,681 ▲2017.08 ▲0.70389.04 ▼46.87212.14 ▲50.78
Media Library /wp-admin/upload.php1,725 ▲275.72 ▼0.01125.20 ▼16.68210.50 ▲22.66
Search Setting /wp-admin/admin.php?page=search-setting1,2812.5753.27103.11
Contact Us /wp-admin/admin.php?page=about-us1,0092.5652.9290.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • title
    • s_posts_per_page
    • e_author
    • loadin_img
    • e_date
    • e_tag
    • e_keyword
    • e_cats

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advance-search-ajax/Advance-Search-Ajax.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/advance-search-ajax/select.php:19
    • > 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 esc_attr__() in wp-content/plugins/advance-search-ajax/setting.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/advance-search-ajax/loop.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that 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 take inspiration from this readme.txt

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

The primary PHP file in "Advance Ajax Live Search" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to 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 check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,028 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
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
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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%