78% ajax-autosearch

Code Review | Ajax AutoSearch

WordPress plugin Ajax AutoSearch scored78%from 54 tests.

About plugin

  • Plugin page: ajax-autosearch
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2020
  • Latest release: Nov 15, 2023
  • Number of updates: 13
  • Update frequency: every 109.0 days
  • Top authors: catchthemes (84.62%)maheshmaharjan (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /7,263 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.18ms] Passed 4 tests

Analyzing server-side resources used by Ajax AutoSearch
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.64 ▼4.22
Dashboard /wp-admin3.41 ▲0.1046.10 ▼1.92
Posts /wp-admin/edit.php3.52 ▲0.1650.59 ▲1.99
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.50 ▼10.70
Media Library /wp-admin/upload.php3.33 ▲0.1036.57 ▲0.13

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax AutoSearch
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17613.76 ▼0.528.65 ▲7.0337.91 ▼7.02
Dashboard /wp-admin2,235 ▲555.55 ▼0.0695.14 ▼3.7582.07 ▲34.80
Posts /wp-admin/edit.php2,143 ▲461.99 ▲0.0339.36 ▲1.0934.01 ▼1.70
Add New Post /wp-admin/post-new.php1,714 ▲18821.88 ▼1.74716.84 ▲19.1452.54 ▼19.40
Media Library /wp-admin/upload.php1,437 ▲374.15 ▼0.0298.85 ▼10.0285.09 ▲37.89

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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)
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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ajax-autosearch/public/partials/ajax-autosearch-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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/ajax-autosearch-admin-display.php:17
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: auto-search, ajax, search

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

"Ajax AutoSearch" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • 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 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,273 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS3218321,112
PHP15170619768
JavaScript35610392
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
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/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%
admin/images/arrow-prev.png2.07KB1.09KB▼ 47.60%
admin/images/arrow-up.png1.35KB0.40KB▼ 70.17%
admin/images/arrow-down.png1.36KB0.40KB▼ 70.40%