Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CR: tm-real-estate.php #55

Open
ghost opened this issue Apr 28, 2016 · 0 comments
Open

CR: tm-real-estate.php #55

ghost opened this issue Apr 28, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 28, 2016

Code Review: tm-real-estate.php

  • Line 7
    @author notation should match the WordPress account name.
  • Line 16
    License notation should match with the license defined on line 10
  • Line 22
    Class name should have the __Tm_ prefix. Current prefix is invalid.
  • Lines 55-58
    These functions should be registered as the hooks.
  • Lines 61-63
    Cherry Core should be loaded via the after_setup_theme hook (via the get_core method).
  • Line 90
    The shortcode name doesn't have the right prefix, tm- expected.
  • Line 135
    New line expected before the if statement.
  • Lines 135-145
    The if statements can be joined.
  • Lines 180-181
    Missing type annotations.
  • Lines 186
    URL should probably be escaped.
  • Line 196,
    Line 199,
    Line 211

    (space) character expected before and after the. (concatenation) sign.
  • Line 206
    Hard coded google map api link should be escaped and SSL verification should apply (use the is_ssl).
  • Line 212,
    Line 220,
    Line 227,
    Line 234,
    Line 241,
    Line 248,
    Line 255,
    Line 262

    Missing ',' (comma) sign after last array element.
  • Line 298
    Use absolute paths.
  • Line 309
    These constants should be defined at the top of the file. Also you should check if constant was already defined or not.
  • Line 332
    return keyword found, but phpdoc @return annotation missing. Although this behavior is strange, because later this method (launch) doesn't return any value.
  • Lines 338-486
    The priority option should be removed as it's not supported anymore. Use (space) characters instead oftabcharacters before & after the=> sign.
  • Line 502
    $data is not defined.
  • Lines 501-503
    Limit the array looping.
  • Lines 505-507
    Use space characters before & after the = sign.
  • Lines 515-516
    wp_mail accept headers as array and this option is preferable.
  • Lines 521-523
    Use spaces before & after the => sign.
  • Line 529
    No user input escaping.
  • Line 547
    Dependencies should be required at the top of the file.
  • Line 548
    The widget will be registered only if the TM_Real_Estate_Search_Form_Widget class was not initialized. But if it was already loaded, nothing will happen. The register_widget call should be moved outside the if statement.
  • Lines 556-582
    Too many tabs.
  • Line 571
    Missing , comma sign after last array element.
  • Line 593
    Use the get_query_var function.
  • Line 618
    Strange debug output should be removed completely.
  • Lines 632-635
    Use spaces before & after the => sign.
  • Line 639
    $settings['tm-properties-main-settings'] should be checked if it is an array.
  • Lines 640-845
    Use spaces before & after the => sign.
  • Line 855
    There should be a notice that this method is used by admin pages.
  • Line 860
    Comma , sign expected after last array element.
  • Lines 866-871
    Use spaces before & after the => sign. Missing text domain in translations.
  • Line 901
    Icon packs should not be hard coded.
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

No branches or pull requests

0 participants