You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We reviewed changes in 1b64c62...34ede8e on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `CATEGORY` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `REQUIRED_CLASSES` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `CREATE_SERVER_PARAMS` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `REQUIRED_ABILITY_FUNCTIONS` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `MIN_PHP_ID` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `SERVER_ID` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `ROUTE_NAMESPACE` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
The reason will be displayed to describe this comment to others. Learn more.
Use of insecure md5() function found
Using md5(), sha1() function is not recommended to generate secure passwords. Due to its fast nature to compute passwords too quickly, these functions can become really easy to crack a password using brute force attack.
It is recommended to use PHP's password hashing function password_hash() to create a secure password hash.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `SKILL_RELEASE_TRANSIENT` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
The reason will be displayed to describe this comment to others. Learn more.
Visibility should be explicitly set for `SKILL_DOWNLOAD_META` constant
Visibility (also know as Access Modifiers) can be used to define where it can be accessed. There are three access modifiers available in PHP:
public - The class members can be accessed from everywhere. This is default.
protected - The class members can be accessed within the class and by classes derived from that class.
private - The class members can only be accessed within the class.
The class members(properties, constants, or methods) declared without any explicit visibility keyword are by default considered as public. It is recommended to set visibility explicitly, which increases code readability. In addition, it gives the developer a mental model of where the class member would be accessible, which also leads to a better API design and makes sure that you are not making something public which isn't supposed to be.
Also, as per PSR-12: Extended Coding Style, visibility should be explicitly declared with all class properties, constants and methods.
This will return "success":true with a fabricated style object named "Hello world!" / post_name: "hello-world", instead of a 404 "invalid style ID" error.
This returns "success": true, "message": "Item added to application successfully." You can check the application as well to see nothing was ever added.
Every ability fails on empty parameters ({}). list-forms, list-views, list-view-layouts, and list-coupons all fail with a generic error when called with parameters: {}, but succeed instantly if you add literally any key, even a made-up one like {"zzz": 1}.
delete-style/get-style operating on any post (garretlaxton, Sep 8): already fixed on this branch — FrmAbilitiesStylesController::get_style() guards with is_style_post() before returning. delete-style itself isn't registered here at all; this PR's Styles controller only registers list/get/update-style, matching the PR description. Delete lives in Pro (formidable-pro#6580), tracked separately there.
Empty {} params failing on list-forms/list-views/list-view-layouts/list-coupons (garretlaxton, Sep 10): traced to AbilityArgumentNormalizer::normalize() in the vendored mcp-adapter package (lib/vendor/wordpress/mcp-adapter), not Formidable's own code. For a schema with properties but no top-level default, it returns [] for both null and {} input — the ability's own execute callback never sees a distinction. list-forms (the only one of the four actually registered in this repo) has no top-level default, so it hits this path. list-views/list-view-layouts/list-coupons aren't registered here at all (formidable-views/formidable-coupons). Out of scope for a fix in this repo — either a mcp-adapter fix upstream, or each affected ability adding a top-level schema default (which changes normalizer behavior to return null, letting WP_Ability apply that default instead).
Not claiming further action on either — clearing labels back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pro functionality https://github.com/Strategy11/formidable-pro/pull/6580
Views functionality https://github.com/Strategy11/formidable-views/pull/751
Landing pages functionality https://github.com/Strategy11/formidable-landing/pull/57
Coupons functionality https://github.com/Strategy11/formidable-coupons/pull/33
API add-on compatibility https://github.com/Strategy11/formidable-api/pull/237
Lite includes the following abilities: