78% autocomplete-for-relevanssi

Code Review | Autocomplete For Relevanssi

WordPress plugin Autocomplete For Relevanssi scored78%from 54 tests.

About plugin

  • Plugin page: autocomplete-for-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Oct 17, 2016
  • Latest release: Oct 24, 2019
  • Number of updates: 10
  • Update frequency: every 110.2 days
  • Top authors: jojaba (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /13,020 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.05ms] Passed 4 tests

Analyzing server-side resources used by Autocomplete For Relevanssi
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.01 ▼3.26
Dashboard /wp-admin3.36 ▲0.0651.37 ▼3.61
Posts /wp-admin/edit.php3.41 ▲0.0652.87 ▲5.86
Add New Post /wp-admin/post-new.php5.94 ▲0.0696.88 ▲1.65
Media Library /wp-admin/upload.php3.28 ▲0.0640.20 ▲1.01
Autocomplete for Relevanssi /wp-admin/options-general.php?page=afr_options_page3.2535.15

Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/autocomplete-for-relevanssi/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Autocomplete For Relevanssi
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.59 ▼1.171.59 ▼0.3041.92 ▼2.04
Dashboard /wp-admin2,225 ▲224.91 ▼1.0597.28 ▼18.5436.99 ▼12.23
Posts /wp-admin/edit.php2,104 ▲72.06 ▲0.0241.09 ▲3.8937.06 ▼2.24
Add New Post /wp-admin/post-new.php1,548 ▲1423.01 ▼0.13655.35 ▲55.1755.28 ▲3.67
Media Library /wp-admin/upload.php1,398 ▼54.24 ▼0.01103.51 ▲2.7151.12 ▲5.41
Autocomplete for Relevanssi /wp-admin/options-general.php?page=afr_options_page9101.8726.6925.73

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 were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/autocomplete-for-relevanssi/autocomplete-for-relevanssi.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autocomplete-for-relevanssi/afr-options.php:22

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === autocomplete-for-relevanssi === )
You can look at the official readme.txt

autocomplete-for-relevanssi/autocomplete-for-relevanssi.php Passed 13 tests

"Autocomplete For Relevanssi" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
92 characters long description:
Autocompletion functionality for WordPress search input when Relevanssi plugin is installed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,321 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript37474651,748
CSS710211576
HTML3700426
PHP24566234
PO File23436139
Markdown3460113
JSON20049
YAML26036

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
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
Namespaces0
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin