84% bp-site-subscriber

Code Review | BP Site Subscriber

WordPress plugin BP Site Subscriber scored84%from 54 tests.

About plugin

  • Plugin page: bp-site-subscriber
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.4
  • WordPress version: 6.3.1
  • First release: Dec 10, 2015
  • Latest release: Dec 8, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: lakrisgubben (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,036 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by BP Site Subscriber
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.52 ▼9.10
Dashboard /wp-admin3.31 ▲0.0146.85 ▼2.92
Posts /wp-admin/edit.php3.36 ▲0.0147.71 ▲3.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.79 ▼2.34
Media Library /wp-admin/upload.php3.23 ▲0.0134.35 ▲0.88

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for BP Site Subscriber
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.44 ▲0.091.69 ▼0.3039.74 ▼3.82
Dashboard /wp-admin2,200 ▲155.83 ▼0.0399.54 ▼17.3139.53 ▼8.45
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0238.91 ▲1.7733.86 ▼3.84
Add New Post /wp-admin/post-new.php1,513 ▼2117.65 ▼5.53675.34 ▲7.7548.78 ▼7.30
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.01100.68 ▲2.9041.69 ▼1.18

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_get_user_meta() in wp-content/plugins/bp-site-subscriber/templates/bp-site-subscriber-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-site-subscriber/bp-site-subscriber.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Component' not found in wp-content/plugins/bp-site-subscriber/includes/notifier.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bp-site-subscriber/includes/widget.php:5

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: multisite, buddypress

bp-site-subscriber/bp-site-subscriber.php 92% from 13 tests

"BP Site Subscriber" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)

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
Good job! No executable or dangerous file extensions detected314 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP457146300
JavaScript12014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.00
▷ Minimum class complexity7.00
▷ Maximum class complexity25.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin