84% bp-post-status

Code Review | BP Post Status

WordPress plugin BP Post Status scored 84% from 54 tests.

About plugin

  • Plugin page: bp-post-status
  • Plugin version: 1.8.12
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 20, 2018
  • Latest release: Jan 15, 2021
  • Number of updates: 151
  • Update frequency: every 6.7 days
  • Top authors: Venutius (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 4,643 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼4.94ms] Passed 4 tests

This is a short check of server-side resources used by BP Post Status
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.45 ▲0.9952.43 ▲10.55
Dashboard /wp-admin4.28 ▲0.9855.33 ▲9.30
Posts /wp-admin/edit.php4.33 ▲0.9858.43 ▲8.16
Add New Post /wp-admin/post-new.php4.06 ▼1.8248.45 ▼45.23
Media Library /wp-admin/upload.php4.20 ▲0.9742.82 ▲8.03
BP Post Status /wp-admin/options-general.php?page=bpps4.1753.27

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
recovery_mode_email_last_sent
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for BP Post Status
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲14813.62 ▼0.786.42 ▲4.3343.84 ▲4.58
Dashboard /wp-admin2,216 ▲284.85 ▼0.03113.38 ▲0.6438.73 ▼1.91
Posts /wp-admin/edit.php2,149 ▲572.09 ▲0.0542.66 ▲1.0336.50 ▲0.13
Add New Post /wp-admin/post-new.php45 ▼1,4740.44 ▼22.560.07 ▼694.518.72 ▼46.89
Media Library /wp-admin/upload.php1,398 ▲104.33 ▲0.11108.46 ▲1.9765.62 ▲22.52
BP Post Status /wp-admin/options-general.php?page=bpps3,7742.1629.6132.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_super_admin() in wp-content/plugins/bp-post-status/templates/group-posts-moderation.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/bp-post-status/templates/my-posts-moderation.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bpps_get_home_query() in wp-content/plugins/bp-post-status/templates/home.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/bp-post-status/templates/my-posts-pending.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/bp-post-status/templates/single-post.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/bp-post-status/templates/shortcode-posts.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_is_active() in wp-content/plugins/bp-post-status/includes/buddypress/bp-admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/bp-post-status/templates/sticky-posts.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/bp-post-status/templates/group-posts.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_displayed_user_id() in wp-content/plugins/bp-post-status/templates/my-posts.php:6

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

bp-post-status/loader.php 92% from 13 tests

The main PHP script in "BP Post Status" version 1.8.12 is automatically included on every request by WordPress
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-post-status.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
No dangerous file extensions were detected4,826 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP312,9111,2604,654
JavaScript53523172

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity54.67
▷ Minimum class complexity2.00
▷ Maximum class complexity209.00
Average method complexity6.19
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods124
▷ Static methods3024.19%
▷ Public methods11995.97%
▷ Protected methods00.00%
▷ Private methods54.03%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG files were detected