84% dcj-search-autocomplete

Code Review | Search Autocomplete by Dotcomjungle

WordPress plugin Search Autocomplete by Dotcomjungle scored84%from 54 tests.

About plugin

  • Plugin page: dcj-search-autoco...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 3, 2019
  • Latest release: Sep 3, 2019
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: dotcomjungle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /739 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.83ms] Passed 4 tests

This is a short check of server-side resources used by Search Autocomplete by Dotcomjungle
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.59 ▲2.54
Dashboard /wp-admin3.32 ▼0.0351.43 ▼12.97
Posts /wp-admin/edit.php3.37 ▲0.0153.96 ▼1.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.64 ▼5.64
Media Library /wp-admin/upload.php3.24 ▲0.0138.50 ▲1.16
Search Autocomplete by Dotcomjungle /wp-admin/options-general.php?page=dcj-autocomplete-options3.2833.41

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Search Autocomplete by Dotcomjungle
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.79 ▼0.588.83 ▲7.2243.56 ▲2.27
Dashboard /wp-admin2,199 ▲255.60 ▼0.0589.33 ▼1.7841.06 ▲2.10
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0338.51 ▲4.6034.57 ▼2.86
Add New Post /wp-admin/post-new.php1,552 ▲1218.38 ▼4.84641.79 ▼61.2151.03 ▼12.39
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.0394.76 ▼14.8143.23 ▼5.10
Search Autocomplete by Dotcomjungle /wp-admin/options-general.php?page=dcj-autocomplete-options1,2682.0626.2427.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_dcj_autocomplete_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dcj-search-autocomplete/widget-searchform.php
    • > /wp-content/plugins/dcj-search-autocomplete/options-page.php
    • > /wp-content/plugins/dcj-search-autocomplete/dcj-autocomplete-search.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: awesomplete, widget, predictive, autofill, custom...

dcj-search-autocomplete/dcj-autocomplete-search.php 92% from 13 tests

"Search Autocomplete by Dotcomjungle" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dcj-search-autocomplete.php" instead of "dcj-autocomplete-search.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,159 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP49547568
JavaScript111336405
CSS4355186

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin