90% searchwp-live-ajax-search

Code Review | SearchWP Live Ajax Search

WordPress plugin SearchWP Live Ajax Search scored90%from 54 tests.

About plugin

  • Plugin page: searchwp-live-aja...
  • Plugin version: 1.7.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.2
  • WordPress version: 6.3.1
  • First release: May 5, 2014
  • Latest release: Jul 5, 2023
  • Number of updates: 98
  • Update frequency: every 34.2 days
  • Top authors: jchristopher (83.67%)pavlo.opanasenko (15.31%)griffinjt (3.06%)

Code review

54 tests

User reviews

29 reviews

Install metrics

50,000+ active /792,546 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.41MB] [CPU: ▲4.03ms] Passed 4 tests

An overview of server-side resources used by SearchWP Live Ajax Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4643.99 ▲4.92
Dashboard /wp-admin3.75 ▲0.4451.94 ▼0.46
Posts /wp-admin/edit.php3.80 ▲0.4449.85 ▲5.80
Add New Post /wp-admin/post-new.php6.27 ▲0.3897.94 ▲5.86
Media Library /wp-admin/upload.php3.61 ▲0.3840.26 ▲6.28
Live Search /wp-admin/admin.php?page=searchwp-live-search3.5839.15

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 76 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_searchwp_live_search
widget_recent-comments
searchwp_live_search_version
searchwp_lite_admin_notifications
widget_theysaidso_widget
widget_recent-posts
db_upgraded
searchwp_live_search_last_update

Browser metrics Passed 4 tests

This is an overview of browser requirements for SearchWP Live Ajax Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,089 ▲35414.17 ▼0.2312.30 ▲10.6345.01 ▲5.85
Dashboard /wp-admin2,273 ▲854.89 ▼0.95104.14 ▼13.9542.30 ▼1.48
Posts /wp-admin/edit.php2,154 ▲622.07 ▼0.0537.51 ▼2.4332.50 ▲0.03
Add New Post /wp-admin/post-new.php1,560 ▲4118.35 ▼4.84629.31 ▼90.5054.24 ▼0.41
Media Library /wp-admin/upload.php1,450 ▲684.28 ▲0.0697.78 ▼0.9541.45 ▼0.19
Live Search /wp-admin/admin.php?page=searchwp-live-search1,2402.1026.6765.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 10 options
    • searchwp_lite_admin_notifications
    • can_compress_scripts
    • widget_searchwp_live_search
    • theysaidso_admin_options
    • searchwp_live_search_last_update
    • widget_recent-comments
    • db_upgraded
    • searchwp_live_search_version
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: search, live, ajax

searchwp-live-ajax-search/searchwp-live-ajax-search.php Passed 13 tests

The main PHP file in "SearchWP Live Ajax Search" ver. 1.7.6 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
Enhance your search forms with live search, powered by SearchWP (if installed)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected8,307 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP216871,3522,095
JavaScript113753241,623
JSON200809
CSS513314766
PO File697123322
Markdown116021

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity20.57
▷ Minimum class complexity2.00
▷ Maximum class complexity69.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods130
▷ Static methods3829.23%
▷ Public methods7456.92%
▷ Protected methods00.00%
▷ Private methods5643.08%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants14
▷ Global constants642.86%
▷ Class constants857.14%
▷ Public constants562.50%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png28.98KB11.49KB▼ 60.35%
banner-772x250.png6.73KB3.79KB▼ 43.67%
screenshot-2.png21.04KB9.70KB▼ 53.90%
screenshot-1.png6.65KB3.74KB▼ 43.78%
screenshot-3.png16.13KB8.79KB▼ 45.48%