78% buddymobile

Code Review | BuddyMobile

WordPress plugin BuddyMobile scored 78% from 54 tests.

About plugin

  • Plugin page: buddymobile
  • Plugin version: 1.9.5
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Mar 6, 2013
  • Latest release: Jul 22, 2016
  • Number of updates: 48
  • Update frequency: every 25.9 days
  • Top authors: modemlooper (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

30+ active / 20,677 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.72MB] [CPU: ▼189.42ms] Passed 4 tests

A check of server-side resources used by BuddyMobile
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.91 ▼0.817.74 ▼14.13
Dashboard /wp-admin1.93 ▼1.128.44 ▼37.34
Posts /wp-admin/edit.php1.93 ▼1.186.35 ▼44.07
Add New Post /wp-admin/post-new.php1.93 ▼3.506.53 ▼644.85
Media Library /wp-admin/upload.php1.93 ▼1.076.99 ▼31.40
BuddyMobile /wp-admin/options-general.php?page=buddymobile/includes/bp-mobile-admin.php1.936.66

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 110 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for BuddyMobile
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲11515.65 ▲0.4211.55 ▲1.1748.29 ▼3.05
Dashboard /wp-admin2,975 ▲415.88 ▼0.23162.53 ▼3.36107.19 ▼8.78
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0191.03 ▲11.3591.50 ▼5.15
Add New Post /wp-admin/post-new.php1,597 ▼2,04918.51 ▲0.15387.83 ▼129.74110.17 ▼2.17
Media Library /wp-admin/upload.php1,815 ▲115.03 ▼0.01176.54 ▼11.35121.88 ▲2.97
BuddyMobile /wp-admin/options-general.php?page=buddymobile/includes/bp-mobile-admin.php1,8134.48108.2086.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/buddymobile/includes/bp-mobile-class.php+33
    Trying to access array offset on value of type bool

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=buddymobile/includes/bp-mobile-admin.php
    • > Notice in wp-content/plugins/buddymobile/includes/bp-mobile-class.php+33
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 78× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/buddymobile/themes/mobile/iphone/header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddymobile/includes/bp-mobile-loader.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_is_current_action() in wp-content/plugins/buddymobile/themes/mobile/iphone/buddypress/members/single/notifications/feedback-no-notifications.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddymobile/themes/mobile/iphone/page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddymobile/themes/mobile/iphone/404.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/buddymobile/themes/mobile/iphone/buddypress/members/single/settings/general.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_directory_members_search_form() in wp-content/plugins/buddymobile/themes/mobile/iphone/buddypress/members/index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/buddymobile/themes/mobile/iphone/buddypress/members/single/profile/change-avatar.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddymobile/themes/mobile/iphone/page-blog.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/buddymobile/themes/mobile/iphone/buddypress/members/activate.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #3, #4, #6 in buddymobile/assets to your readme.txt
The official readme.txt might help

buddymobile/loader.php 92% from 13 tests

"BuddyMobile" version 1.9.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("buddymobile.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin8,013 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
PHP862,4453793,974
CSS4206941,948
JavaScript53441291,381
PO File1299918710

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/mobile/iphone/css/images/navbutton.png0.56KB0.48KB▼ 13.31%
themes/mobile/iphone/css/images/navleft.png0.81KB0.90KB0.00%
themes/mobile/iphone/css/images/closed.png0.31KB0.21KB▼ 31.11%
themes/mobile/iphone/css/images/home.png0.35KB0.28KB▼ 21.05%
themes/mobile/iphone/css/images/arrow.png0.35KB0.28KB▼ 21.05%