Fix/weak typing#631
Conversation
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
86 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information. |
📁 includes/MslsRestApi.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
405 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information. |
📁 includes/MslsTranslationPickerTable.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
180 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information. |
📁 includes/MslsWidget.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
58 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ALTERNATIVE_CONTENT_HOOK". |
📁 includes/MslsAdmin.php (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
253 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_REGISTER_ACTION". |
357 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ACTION_PREFIX . $section". |
📁 includes/Map/HrefLang.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
69 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_HEAD_HREFLANG_HOOK". |
📁 includes/MslsBlog.php (3 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
143 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_GET_PERMALINK_HOOK". |
147 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_GET_PERMALINK_HOOK". |
201 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::WP_ADMIN_BAR_SHOW_SITE_ICONS_HOOK". |
📁 includes/Component/Input/Select.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
39 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::RENDER_FILTER". |
📁 includes/MslsPostTagClassic.php (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
39 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ADD_INPUT_ACTION". |
71 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_EDIT_INPUT_ACTION". |
📁 includes/MslsMain.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
143 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_SAVE_ACTION". |
📁 includes/MslsPostTag.php (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
140 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ADD_INPUT_ACTION". |
175 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_EDIT_INPUT_ACTION". |
📁 includes/MslsOutput.php (6 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
96 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_GET_HOOK". |
125 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ALTERNATE_LINKS_HOOK". |
141 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ALTERNATE_LINKS_DEFAULT_HOOK". |
144 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ALTERNATE_LINKS_ARR_HOOK". |
157 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_NO_TRANSLATION_FOUND_HOOK". |
188 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_GET_TAGS_HOOK". |
📁 includes/ContentImport/ContentImporter.php (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
299 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_BEFORE_IMPORT_ACTION". |
360 |
WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_AFTER_IMPORT_ACTION". |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
|
Warning Gemini is experiencing higher than usual traffic and was unable to create the review. Please try again in a few hours by commenting |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive type safety improvements and defensive programming measures across the codebase, including explicit return types, instanceof checks for WordPress objects, and is_callable validations for dynamic method calls. The refactoring also addresses potential issues with null or false return values from core functions and includes corresponding updates to the PHPUnit test suite. Reviewer feedback identifies several instances where the use of Closure::fromCallable is considered unnecessary for public static methods and points out a redundant null coalescing operator where the array key is already guaranteed to exist.
No description provided.