89% ajax-search-bar

Code Review | Ajax Search Bar by DGAshu

WordPress plugin Ajax Search Bar by DGAshu scored89%from 54 tests.

About plugin

  • Plugin page: ajax-search-bar
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Feb 23, 2022
  • Latest release: May 12, 2022
  • Number of updates: 3
  • Update frequency: every 28.0 days
  • Top authors: dgashu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,383 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Ajax Search Bar by DGAshu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.19 ▼1.89
Dashboard /wp-admin3.32 ▼0.0348.14 ▼10.32
Posts /wp-admin/edit.php3.37 ▲0.0145.32 ▼4.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.91 ▼22.34
Media Library /wp-admin/upload.php3.24 ▲0.0133.22 ▼3.42

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Ajax Search Bar by DGAshu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲10313.48 ▼1.078.37 ▲6.4141.14 ▼9.17
Dashboard /wp-admin2,211 ▲305.62 ▼0.0584.74 ▼16.0238.15 ▼6.42
Posts /wp-admin/edit.php2,119 ▲192.00 ▲0.0335.66 ▼5.7432.37 ▼3.95
Add New Post /wp-admin/post-new.php1,552 ▲2623.27 ▲0.32640.00 ▼18.1457.04 ▼46.91
Media Library /wp-admin/upload.php1,419 ▲224.23 ▼0.0295.59 ▼25.2844.49 ▼2.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: Please take inspiration from this readme.txt

ajax-search-bar/index.php 92% from 13 tests

The main file in "Ajax Search Bar by DGAshu" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ajax-search-bar.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin26,471 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected