10% search-into-subcategories

Code Review | Search-into-subcategories

WordPress plugin Search-into-subcategories scored10%from 54 tests.

About plugin

  • Plugin page: search-into-subca...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.2
  • WordPress version: 6.3.1
  • First release: Mar 8, 2014
  • Latest release: Oct 24, 2017
  • Number of updates: 40
  • Update frequency: every 33.2 days
  • Top authors: lion2486 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /4,159 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/search-into-subcategories/search-into-subcategories-plugin.php+57
    Declaration of My_Walker_CategoryDropdown::start_el(&$output, $category, $depth = 0, $args = Array) should be compatible with Walker_CategoryDropdown::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)

Server metrics [RAM: ▼1.82MB] [CPU: ▼61.36ms] Passed 4 tests

An overview of server-side resources used by Search-into-subcategories
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.305.39 ▼52.21
Dashboard /wp-admin2.18 ▼1.127.32 ▼44.73
Posts /wp-admin/edit.php2.18 ▼1.177.57 ▼54.67
Add New Post /wp-admin/post-new.php2.18 ▼3.706.41 ▼93.81
Media Library /wp-admin/upload.php2.18 ▼1.057.31 ▼30.76

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Search-into-subcategories
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.59 ▲0.232.03 ▼0.2542.42 ▼17.50
Dashboard /wp-admin2,189 ▲125.55 ▼0.1784.61 ▼3.0644.08 ▲1.56
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0437.51 ▲0.6435.60 ▼2.44
Add New Post /wp-admin/post-new.php1,536 ▲822.99 ▼0.18666.22 ▼16.5649.26 ▼2.61
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.05103.82 ▼4.4247.00 ▲2.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/search-into-subcategories/search-into-subcategories-plugin.php+57
    Declaration of My_Walker_CategoryDropdown::start_el(&$output, $category, $depth = 0, $args = Array) should be compatible with Walker_CategoryDropdown::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_CategoryDropdown' not found in wp-content/plugins/search-into-subcategories/search-into-subcategories-plugin.php:19

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Search Category Level 1), #2 (Search Category Level 2), #3 (Search Category Level 3 & Input)
The official readme.txt might help

search-into-subcategories/search-into-subcategories-plugin.php 92% from 13 tests

This is the main PHP file of "Search-into-subcategories" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("search-into-subcategories.php" instead of "search-into-subcategories-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin4,944 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript39144644,420
PHP177103289
CSS13110198
PO File1101237

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity18.00
▷ Minimum class complexity6.00
▷ Maximum class complexity30.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin