84% bp-classic

Code Review | BP Classic

WordPress plugin BP Classic scored84%from 54 tests.

About plugin

  • Plugin page: bp-classic
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jul 31, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 6
  • Update frequency: every 19.3 days
  • Top authors: imath (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /3,992 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.42ms] Passed 4 tests

This is a short check of server-side resources used by BP Classic
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.15 ▼7.29
Dashboard /wp-admin3.31 ▲0.0144.48 ▼3.23
Posts /wp-admin/edit.php3.36 ▲0.0148.44 ▼1.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.63 ▼1.29
Media Library /wp-admin/upload.php3.24 ▲0.0137.23 ▲0.39

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 141 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by BP Classic
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.34 ▲0.081.78 ▲0.0143.35 ▼0.82
Dashboard /wp-admin2,195 ▲215.60 ▲0.0295.35 ▼3.6543.92 ▲1.65
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0640.14 ▼1.8836.70 ▲0.14
Add New Post /wp-admin/post-new.php1,526 ▼023.70 ▲0.55660.07 ▼27.2655.16 ▼7.18
Media Library /wp-admin/upload.php1,394 ▼64.23 ▼0.0294.87 ▼5.4942.12 ▲0.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 69× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bp-classic/themes/bp-default/members/single/member-header.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bp-classic/themes/bp-default/activity/comment.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bp-classic/themes/bp-default/searchform.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bp-classic/themes/bp-default/members/single/settings/profile.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bp-classic/themes/bp-default/index.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bp-classic/themes/bp-default/members/index.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bp-classic/themes/bp-default/members/single/messages/notices-loop.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bp-classic/themes/bp-default/groups/create.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bp-classic/themes/bp-default/links.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bp-classic/themes/bp-default/members/single/messages/single.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues 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
2 plugin tags: backcompat, buddypress

bp-classic/class-bp-classic.php 92% from 13 tests

This is the main PHP file of "BP Classic" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bp-classic.php" instead of "class-bp-classic.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin11,937 lines of code in 121 files:
LanguageFilesBlank linesComment linesLines of code
PHP1063,0042,8176,727
CSS101743573,712
JavaScript43351221,337
Sass1584161

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.54
▷ Minimum class complexity6.00
▷ Maximum class complexity25.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods79
▷ Static methods67.59%
▷ Public methods7594.94%
▷ Protected methods33.80%
▷ Private methods11.27%
Functions121
▷ Named functions121100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/bp-default/_inc/images/45pc_black.png0.08KB0.09KB0.00%
themes/bp-default/_inc/images/white-grad.png0.08KB0.18KB0.00%
themes/bp-default/_inc/images/60pc_black.png0.07KB0.09KB0.00%
themes/bp-default/screenshot.png35.22KB13.49KB▼ 61.71%
themes/bp-default/_inc/images/rss.png0.62KB0.70KB0.00%