84% tb-search-in-menu

Code Review | TB Search in Menu

WordPress plugin TB Search in Menu scored84%from 54 tests.

About plugin

  • Plugin page: tb-search-in-menu
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Jan 7, 2016
  • Latest release: Jan 7, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: vladff (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /5,983 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by TB Search in Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.10 ▲1.98
Dashboard /wp-admin3.31 ▲0.0144.89 ▼2.22
Posts /wp-admin/edit.php3.36 ▲0.0048.40 ▼1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.73 ▼9.82
Media Library /wp-admin/upload.php3.23 ▲0.0033.75 ▼0.15

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

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

Browser metrics Passed 4 tests

TB Search in Menu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲17613.69 ▼0.905.87 ▲4.1642.79 ▼0.21
Dashboard /wp-admin2,209 ▲214.84 ▼0.05112.60 ▲9.2040.39 ▼1.93
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0639.68 ▲3.6440.10 ▲4.95
Add New Post /wp-admin/post-new.php1,542 ▲923.51 ▲0.27681.56 ▲9.7960.40 ▲4.17
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0297.30 ▼1.0740.31 ▼2.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tb-search-in-menu/includes/styles.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tb-search-in-menu/includes/customizer.php:144

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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: Please replace "Plugin Name" with the name of your plugin on the first line ( === tb-search-in-menu === )
You can look at the official readme.txt

tb-search-in-menu/tb-search-in-menu.php Passed 13 tests

The entry point to "TB Search in Menu" version 1.0.0 is a PHP file that has certain tags in its header comment area
61 characters long description:
This plugin adds a search item in the nav menu of your choice

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected336 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP42757200
CSS132108
JavaScript11015
SVG10013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin