84% lightweight-live-ajax-search

Code Review | Lightweight Live Ajax Search

WordPress plugin Lightweight Live Ajax Search scored84%from 54 tests.

About plugin

  • Plugin page: lightweight-live-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: May 2, 2020
  • Latest release: Aug 18, 2020
  • Number of updates: 5
  • Update frequency: every 22.4 days
  • Top authors: sandesh055 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /864 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.95ms] Passed 4 tests

Analyzing server-side resources used by Lightweight Live Ajax Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.34 ▲2.73
Dashboard /wp-admin3.35 ▲0.0145.97 ▼12.04
Posts /wp-admin/edit.php3.46 ▲0.1146.08 ▼0.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.25 ▼24.84
Media Library /wp-admin/upload.php3.27 ▲0.0536.11 ▲1.88
Live Search /wp-admin/options-general.php?page=wpls_settings3.2530.79

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Lightweight Live Ajax Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.15 ▼1.531.68 ▲0.0740.91 ▲0.97
Dashboard /wp-admin2,210 ▲184.88 ▼0.07105.22 ▼3.3739.39 ▼0.33
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0241.16 ▲0.3936.05 ▲1.49
Add New Post /wp-admin/post-new.php1,540 ▲1223.49 ▲5.10681.34 ▲78.4958.37 ▼24.90
Media Library /wp-admin/upload.php1,389 ▼24.20 ▼0.0695.44 ▼5.2240.48 ▼3.53
Live Search /wp-admin/options-general.php?page=wpls_settings8832.0621.4727.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lightweight-live-ajax-search/includes/settings-page.php
    • > /wp-content/plugins/lightweight-live-ajax-search/lightweight-live-ajax-search.php
    • > /wp-content/plugins/lightweight-live-ajax-search/classes/class-wpls-loader.php
    • > /wp-content/plugins/lightweight-live-ajax-search/includes/search-form-template.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
4 plugin tags: ajax, live, lightweight, search

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

This is the main PHP file of "Lightweight Live Ajax Search" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
102 characters long description:
Live AJAX based search functionality. This plugin provides shortcode to display live search input box.

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
Success! There were no dangerous files found in this plugin588 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8109192309
CSS23417180
JavaScript1345299

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.20
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods20
▷ Static methods630.00%
▷ Public methods1470.00%
▷ Protected methods00.00%
▷ Private methods630.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin