83% search-top-bar

Code Review | Search Top Bar

WordPress plugin Search Top Bar scored83%from 54 tests.

About plugin

  • Plugin page: search-top-bar
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 8, 2018
  • Latest release: Nov 16, 2018
  • Number of updates: 21
  • Update frequency: every 0.4 days
  • Top authors: jlgmatheus05 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Search Top Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0727.94 ▼12.82
Dashboard /wp-admin3.33 ▲0.0244.74 ▼4.93
Posts /wp-admin/edit.php3.38 ▲0.0248.69 ▼2.64
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.23 ▼3.46
Media Library /wp-admin/upload.php3.25 ▲0.0233.75 ▲1.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Search Top Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,010 ▲27514.20 ▼0.187.33 ▲5.5049.26 ▲4.05
Dashboard /wp-admin2,248 ▲605.08 ▼0.80105.71 ▼9.7246.02 ▲2.28
Posts /wp-admin/edit.php2,162 ▲762.30 ▲0.2937.09 ▲0.5836.04 ▲3.86
Add New Post /wp-admin/post-new.php1,545 ▲3123.12 ▲5.57668.38 ▲18.7636.79 ▼28.14
Media Library /wp-admin/upload.php1,424 ▲364.39 ▲0.21100.31 ▼4.0143.37 ▼0.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-top-bar/stb-searchtopbar.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #5 (Example 4), #6 (Example 5)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === search-top-bar === )
Please take inspiration from this readme.txt

search-top-bar/stb-searchtopbar.php 92% from 13 tests

The principal PHP file in "Search Top Bar" v. 1.1.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("search-top-bar.php" instead of "stb-searchtopbar.php")

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 detected520 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP21526248
CSS230148
JavaScript2196124

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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
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%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin