84% nk-search

Code Review | NK Search - WP Simple Search with Auto Suggestion

WordPress plugin NK Search - WP Simple Search with Auto Suggestion scored84%from 54 tests.

About plugin

  • Plugin page: nk-search
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2020
  • Latest release: Oct 19, 2022
  • Number of updates: 25
  • Update frequency: every 31.8 days
  • Top authors: nandakrishnan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /397 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by NK Search - WP Simple Search with Auto Suggestion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.75 ▼4.22
Dashboard /wp-admin3.33 ▲0.0349.11 ▲0.38
Posts /wp-admin/edit.php3.38 ▲0.0345.27 ▼0.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.73 ▼6.45
Media Library /wp-admin/upload.php3.26 ▲0.0333.96 ▼2.01

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

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

Browser metrics Passed 4 tests

A check of browser resources used by NK Search - WP Simple Search with Auto Suggestion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲14013.62 ▼0.759.32 ▲7.3243.75 ▲2.97
Dashboard /wp-admin2,206 ▲144.89 ▼0.04111.44 ▲6.3745.83 ▲1.15
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0036.71 ▲0.2432.12 ▼1.06
Add New Post /wp-admin/post-new.php1,534 ▲123.30 ▲0.20659.53 ▼24.8249.33 ▼3.54
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.00100.79 ▼0.1042.69 ▼2.08

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/nk-search/nk-search.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Add a description for screenshot #1 in nk-search/assets to your readme.txt
Please take inspiration from this readme.txt

nk-search/nk-search.php Passed 13 tests

"NK Search - WP Simple Search with Auto Suggestion" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
43 characters long description:
WP Search Custom Form with Auto Suggestion.

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
There were no executable files found in this plugin270 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP51158115
CSS10088
JavaScript10054
Markdown11013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
nk-assets/img/search-icon.png1.21KB0.98KB▼ 18.79%