icon-256x256
  • 64% gift-buddypress-addons

    Code Review | Gift Buddypress Addons

    WordPress plugin Gift Buddypress Addons scored64%from 54 tests.

    About plugin

    • Plugin page: gift-buddypress-a...
    • Plugin version: 2.0.0
    • PHP version: 7.4.16
    • WordPress compatibility: 4.3.1-4.9.1
    • WordPress version: 6.3.1
    • First release: Apr 9, 2015
    • Latest release: Dec 29, 2017
    • Number of updates: 35
    • Update frequency: every 28.4 days
    • Top authors: aiyaz (100%)

    Code review

    54 tests

    User reviews

    7 reviews

    Install metrics

    20+ active /5,619 total downloads

    Benchmarks

    Plugin footprint 48% 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.06MB] [CPU: ▼0.12ms] Passed 4 tests

    Server-side resources used by Gift Buddypress Addons
    No issues were detected with server-side resource usage
    PageMemory (MB)CPU Time (ms)
    Home /3.55 ▲0.0839.40 ▼2.43
    Dashboard /wp-admin3.36 ▲0.0651.31 ▼1.48
    Posts /wp-admin/edit.php3.41 ▲0.0651.41 ▲6.48
    Add New Post /wp-admin/post-new.php5.94 ▲0.0682.86 ▼1.00
    Media Library /wp-admin/upload.php3.29 ▲0.0640.03 ▲4.41
    Add New Gift /wp-admin/post-new.php?post_type=gift-post3.4150.11
    Manage Gifts /wp-admin/edit.php?post_type=gift-post3.3340.36
    Gift Categories /wp-admin/edit-tags.php?taxonomy=gifts&post_type=gift-post3.2939.82

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

    A short overview of filesystem and database impact
    The plugin installed successfully
    Filesystem: 9 new files
    Database: 1 new table, 7 new options
    New tables
    wp_bp_gift_addons_meta
    New WordPress options
    can_compress_scripts
    db_upgraded
    widget_theysaidso_widget
    widget_recent-comments
    gifts_children
    theysaidso_admin_options
    widget_recent-posts

    Browser metrics Passed 4 tests

    This is an overview of browser requirements for Gift Buddypress Addons
    This plugin has a minimal impact on browser resources
    PageNodesMemory (MB)Script (ms)Layout (ms)
    Home /2,922 ▲15113.96 ▼0.335.61 ▲3.7438.72 ▼1.74
    Dashboard /wp-admin2,237 ▲495.86 ▲0.97108.87 ▲4.6841.29 ▲4.30
    Posts /wp-admin/edit.php2,117 ▲492.03 ▼0.0239.71 ▲4.0535.50 ▲3.09
    Add New Post /wp-admin/post-new.php1,559 ▲4523.25 ▲5.65637.79 ▼35.5250.73 ▲4.30
    Media Library /wp-admin/upload.php1,419 ▲314.26 ▲0.0693.99 ▼11.8541.10 ▼4.28
    Add New Gift /wp-admin/post-new.php?post_type=gift-post2,3527.73187.7869.60
    Manage Gifts /wp-admin/edit.php?post_type=gift-post1,1011.9531.8829.90
    Gift Categories /wp-admin/edit-tags.php?taxonomy=gifts&post_type=gift-post1,5012.1527.0237.84

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

    🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
    It is recommended to fix the following
    • This plugin cannot be uninstalled
      • > Warning in wp-includes/class-wp-hook.php+310
      call_user_func_array() expects parameter 1 to be a valid callback, class 'Gift_Buddypress_Template' does not have a method 'deactivate'
    • This plugin does not fully uninstall, leaving 1 table in the database
      • wp_bp_gift_addons_meta
    • The uninstall procedure has failed, leaving 7 options in the database
      • widget_theysaidso_widget
      • gifts_children
      • widget_recent-comments
      • can_compress_scripts
      • widget_recent-posts
      • theysaidso_admin_options
      • db_upgraded

    Smoke tests 75% from 4 tests

    Server-side errors Passed 1 test

    🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
    The smoke test was a success, however most plugin functionality was not tested

    SRP 50% from 2 tests

    🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
    Please fix the following
    • 1× PHP files trigger server-side errors or warnings when accessed directly:
      • > PHP Fatal error
        Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gift-buddypress-addons/buddypress-gift-addon.php:452

    User-side errors Passed 1 test

    🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
    Everything seems fine on the user side

    Optimizations

    Plugin configuration 93% from 29 tests

    readme.txt 94% from 16 tests

    You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
    Attributes that require attention:
    • Tags: You are using too many tags: 14 tag instead of maximum 10
    You can take inspiration from this readme.txt

    gift-buddypress-addons/buddypress-gift-addon.php 92% from 13 tests

    The main PHP file in "Gift Buddypress Addons" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
    It is important to fix the following:
    • Main file name: Name the main plugin file the same as the plugin slug ("gift-buddypress-addons.php" instead of "buddypress-gift-addon.php")

    Code Analysis Passed 3 tests

    File types Passed 1 test

    🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
    No dangerous file extensions were detected1,025 lines of code in 6 files:
    LanguageFilesBlank linesComment linesLines of code
    PHP25737472
    CSS26328335
    JavaScript22315218

    PHP code Passed 2 tests

    Cyclomatic complexity and code structure are the fingerprint of this plugin
    No complexity issues detected
    Cyclomatic complexity
    Average complexity per logical line of code0.22
    Average class complexity17.00
    ▷ Minimum class complexity2.00
    ▷ Maximum class complexity32.00
    Average method complexity2.45
    ▷ Minimum method complexity1.00
    ▷ Maximum method complexity7.00
    Code structure
    Namespaces0
    Interfaces0
    Traits0
    Classes2
    ▷ Abstract classes00.00%
    ▷ Concrete classes2100.00%
    ▷ Final classes00.00%
    Methods22
    ▷ Static methods14.55%
    ▷ Public methods22100.00%
    ▷ Protected methods00.00%
    ▷ Private methods00.00%
    Functions0
    ▷ Named functions00.00%
    ▷ Anonymous functions00.00%
    Constants0
    ▷ Global constants00.00%
    ▷ Class constants00.00%
    ▷ Public constants00.00%

    Plugin size Passed 2 tests

    Image compression Passed 2 tests

    It is recommended to compress PNG files in your plugin to minimize bandwidth usage
    1 PNG file occupies 0.00MB with 0.00MB in potential savings
    Potential savings
    Compression of 1 random PNG file using pngquant
    FileSize - originalSize - compressedSavings
    images/150x150.png2.04KB0.94KB▼ 54.03%