Skip to content

Restructuring#632

Open
lloc wants to merge 12 commits into
masterfrom
fix/weak_typing
Open

Restructuring#632
lloc wants to merge 12 commits into
masterfrom
fix/weak_typing

Conversation

@lloc
Copy link
Copy Markdown
Owner

@lloc lloc commented May 13, 2026

MslsOptions classes moved into includes/Options folder.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the MslsOptions class hierarchy by moving it into the lloc\Msls\Options namespace and providing backward compatibility through class_alias. It also includes various stability improvements, such as adding missing null checks, improving type safety, and ensuring is_callable checks before executing callbacks. The reviewer correctly identified a potential performance issue regarding redundant filter registration in Options::create() and suggested a fix.

Comment thread includes/Options/Options.php Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
27 0 27

⚠️ Warnings (27)

📁 includes/MslsCustomFilter.php (1 warning)
📍 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
407 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/Options/Query/Query.php (1 warning)
📍 Line 🔖 Check 💬 Message
90 WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "Options::MSLS_GET_POSTLINK_HOOK".
📁 includes/Options/Post/Post.php (1 warning)
📍 Line 🔖 Check 💬 Message
47 WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "Options::MSLS_GET_POSTLINK_HOOK".
📁 includes/Options/Tax/Tax.php (1 warning)
📍 Line 🔖 Check 💬 Message
99 WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "Options::MSLS_GET_POSTLINK_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
40 WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ADD_INPUT_ACTION".
72 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
145 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
141 WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ADD_INPUT_ACTION".
176 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
97 WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_GET_HOOK".
126 WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ALTERNATE_LINKS_HOOK".
142 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".
145 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".
158 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".
189 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

@lloc lloc changed the title Fix/weak typing Restructuring May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant