78% sd-live-search

Code Review | SD Live Search

WordPress plugin SD Live Search scored 78% from 54 tests.

About plugin

  • Plugin page: sd-live-search
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 15, 2018
  • Latest release: Mar 15, 2018
  • Number of updates: 6
  • Update frequency: every 1.7 days
  • Top authors: swapnild (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.31ms] Passed 4 tests

Server-side resources used by SD Live Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.67 ▼6.00
Dashboard /wp-admin3.34 ▲0.0354.31 ▼1.74
Posts /wp-admin/edit.php3.39 ▲0.0347.51 ▲0.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.29 ▼6.12
Media Library /wp-admin/upload.php3.26 ▲0.0335.40 ▲1.89

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SD Live Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3713.28 ▼1.112.08 ▲0.0642.12 ▼9.53
Dashboard /wp-admin2,211 ▲264.86 ▼1.01101.70 ▼25.2941.18 ▼6.62
Posts /wp-admin/edit.php2,091 ▲22.03 ▼0.0235.58 ▼2.4830.90 ▼2.44
Add New Post /wp-admin/post-new.php1,530 ▼1223.27 ▲5.09695.07 ▼87.0159.37 ▼6.04
Media Library /wp-admin/upload.php1,381 ▼44.32 ▲0.1699.24 ▼3.0941.97 ▼5.74

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sd-live-search/ult-search.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant SD_SEARCH_PLUGIN_DIR - assumed 'SD_SEARCH_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sd-live-search/ult-search.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/sd-live-search/searchform.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sd-live-search/sd-live-search.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: The official readme.txt is a good inspiration

sd-live-search/sd-live-search.php 92% from 13 tests

The principal PHP file in "SD Live Search" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 detected451 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS126189
PHP32619157
JavaScript12416105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 images were found in this plugin