88% ajax-autosearch

Code Review | Ajax AutoSearch

WordPress plugin Ajax AutoSearch scored 88% from 53 tests.

About plugin

  • Plugin page: ajax-autosearch
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8
  • WordPress version: 5.8.1
  • First release: Jan 7, 2020
  • Latest release: Sep 17, 2021
  • Number of updates: 9
  • Update frequency: every 69.8 days
  • Top authors: catchthemes (77.78%)maheshmaharjan (33.33%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 2,499 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼300.27ms] Passed 4 tests

An overview of server-side resources used by Ajax AutoSearch
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2235.14 ▲14.74
Dashboard /wp-admin3.16 ▲0.1040.61 ▼7.72
Posts /wp-admin/edit.php3.27 ▲0.1641.34 ▼0.69
Add New Post /wp-admin/post-new.php5.52 ▲0.0992.32 ▼1,186.17
Media Library /wp-admin/upload.php3.10 ▲0.0932.81 ▼6.51

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Ajax AutoSearch
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,816 ▲31116.43 ▲2.6811.45 ▲2.2947.13 ▼1.91
Dashboard /wp-admin2,978 ▲1195.98 ▲0.16130.30 ▼0.17125.50 ▲23.13
Posts /wp-admin/edit.php2,748 ▲422.58 ▼0.1163.15 ▼3.5295.47 ▲7.11
Add New Post /wp-admin/post-new.php2,271 ▲23325.08 ▲5.90366.91 ▼2.87112.25 ▼2.59
Media Library /wp-admin/upload.php1,828 ▲594.98 ▼0.04123.88 ▼26.51132.89 ▲12.96

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ajax-autosearch/public/partials/ajax-autosearch-public-display.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ajax-autosearch/admin/partials/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ajax-autosearch/admin/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ajax-autosearch/admin/partials/dashboard-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ajax-autosearch/admin/partials/ajax-autosearch-admin-display.php:17

User-side errors Passed 1 test

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


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
3 plugin tags: auto-search, search, ajax

ajax-autosearch/ajax-autosearch.php 92% from 13 tests

The primary PHP file in "Ajax AutoSearch" version 1.3.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,273 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%
admin/images/arrow-next.png2.10KB1.07KB▼ 48.86%
admin/images/arrow-down.png1.36KB0.40KB▼ 70.40%
admin/images/arrow-up.png1.35KB0.40KB▼ 70.17%
admin/images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%