84% wp-graphql-buddypress

Code Review | WPGraphQL BuddyPress

WordPress plugin WPGraphQL BuddyPress scored84%from 54 tests.

About plugin

  • Plugin page: wp-graphql-buddyp...
  • Plugin version: 0.1.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: Jun 20, 2023
  • Latest release: Jun 20, 2023
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: espellcaste (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /215 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.93ms] Passed 4 tests

A check of server-side resources used by WPGraphQL BuddyPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.36 ▼7.19
Dashboard /wp-admin3.31 ▲0.0044.06 ▲2.78
Posts /wp-admin/edit.php3.36 ▲0.0046.12 ▲2.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.08 ▼23.86
Media Library /wp-admin/upload.php3.23 ▲0.0034.94 ▲0.90

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 244 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WPGraphQL BuddyPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.20 ▼1.174.95 ▲3.0540.48 ▼7.05
Dashboard /wp-admin2,203 ▲185.77 ▼0.1196.01 ▼6.5836.51 ▼2.62
Posts /wp-admin/edit.php2,086 ▼32.03 ▼0.0237.28 ▼3.8133.18 ▼0.67
Add New Post /wp-admin/post-new.php1,533 ▲1923.11 ▲5.60645.70 ▲27.0352.64 ▲2.40
Media Library /wp-admin/upload.php1,382 ▼34.32 ▲0.0298.62 ▼1.2241.12 ▼2.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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 | 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 take a closer look at the following
  • 143× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-graphql-buddypress/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WPGraphQL\\Data\\Loader\\AbstractDataLoader' not found in wp-content/plugins/wp-graphql-buddypress/src/Data/Loader/NotificationObjectLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-graphql-buddypress/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPGraphQL\\Data\\Connection\\AbstractConnectionResolver' not found in wp-content/plugins/wp-graphql-buddypress/src/Connection/Resolvers/BlogsConnectionResolver.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-graphql-buddypress/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-graphql-buddypress/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WPGraphQL\\Data\\Loader\\AbstractDataLoader' not found in wp-content/plugins/wp-graphql-buddypress/src/Data/Loader/MessageObjectLoader.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WPGraphQL\\Data\\Connection\\AbstractConnectionResolver' not found in wp-content/plugins/wp-graphql-buddypress/src/Connection/Resolvers/MembersConnectionResolver.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WPGraphQL\\Data\\Connection\\AbstractConnectionResolver' not found in wp-content/plugins/wp-graphql-buddypress/src/Connection/Resolvers/FriendshipsConnectionResolver.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-graphql-buddypress/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: bp graphql, rest, social networking, graphql, api...

wp-graphql-buddypress/wp-graphql-buddypress.php 92% from 13 tests

The principal PHP file in "WPGraphQL BuddyPress" v. 0.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin13,152 lines of code in 239 files:
LanguageFilesBlank linesComment linesLines of code
PHP2382,5075,51912,992
JSON100160

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity5.84
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces23
Interfaces0
Traits0
Classes231
▷ Abstract classes10.43%
▷ Concrete classes23099.57%
▷ Final classes10.43%
Methods582
▷ Static methods29751.03%
▷ Public methods49985.74%
▷ Protected methods6911.86%
▷ Private methods142.41%
Functions335
▷ Named functions20.60%
▷ Anonymous functions33399.40%
Constants9
▷ Global constants555.56%
▷ Class constants444.44%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected