78% search-types-custom-fields-widget

Code Review | Search Widget and WP REST Server for Toolset Types

WordPress plugin Search Widget and WP REST Server for Toolset Types scored 78% from 54 tests.

About plugin

  • Plugin page: search-types-cust...
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6
  • WordPress version: 6.3.1
  • First release: Nov 2, 2013
  • Latest release: Nov 10, 2016
  • Number of updates: 63
  • Update frequency: every 20.1 days
  • Top authors: Magenta Cuda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 5,047 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼12.64ms] Passed 4 tests

Analyzing server-side resources used by Search Widget and WP REST Server for Toolset Types
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0322.81 ▼18.24
Dashboard /wp-admin3.36 ▲0.0544.64 ▼1.90
Posts /wp-admin/edit.php3.47 ▲0.1146.87 ▼4.73
Add New Post /wp-admin/post-new.php5.97 ▲0.0983.52 ▼25.70
Media Library /wp-admin/upload.php3.28 ▲0.0535.33 ▲3.30

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_search_types_custom_fields_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Search Widget and WP REST Server for Toolset Types
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20814.29 ▼0.0613.45 ▲11.7040.08 ▼0.13
Dashboard /wp-admin2,217 ▲296.01 ▲0.9496.03 ▼9.7037.88 ▼4.30
Posts /wp-admin/edit.php2,102 ▲132.24 ▲0.1834.12 ▼7.2131.44 ▼4.18
Add New Post /wp-admin/post-new.php1,528 ▲1423.32 ▲5.64672.76 ▲39.5949.50 ▼2.33
Media Library /wp-admin/upload.php1,396 ▲54.35 ▲0.10102.72 ▲4.1750.37 ▲6.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_search_types_custom_fields_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/search-types-custom-fields-widget/stcfw-search-results-template.php
    • > /wp-content/plugins/search-types-custom-fields-widget/stcfw-search-results-bootstrap-template.php
    • > /wp-content/plugins/search-types-custom-fields-widget/user-templates-no-bootstrap-sample.php
    • > /wp-content/plugins/search-types-custom-fields-widget/user-templates-sample.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/search-types-custom-fields-widget/search-types-custom-fields-widget.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/search-types-custom-fields-widget/search-types-custom-fields-widget.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: search, custom fields

search-types-custom-fields-widget/search-types-custom-fields-widget-loader.php 92% from 13 tests

"Search Widget and WP REST Server for Toolset Types" version 2.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("search-types-custom-fields-widget.php" instead of "search-types-custom-fields-widget-loader.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
Everything looks great! No dangerous files found in this plugin14,938 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS868315,763
JavaScript81,4881,1435,695
PHP71423533,027
SVG100288
HTML100165

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity83.67
▷ Minimum class complexity5.00
▷ Maximum class complexity180.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods1448.28%
▷ Public methods2689.66%
▷ Protected methods310.34%
▷ Private methods00.00%
Functions63
▷ Named functions00.00%
▷ Anonymous functions63100.00%
Constants13
▷ Global constants00.00%
▷ Class constants13100.00%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin