84% bp-pinned-feed-notices

Code Review | Pinned Feed Notices for BuddyPress

WordPress plugin Pinned Feed Notices for BuddyPress scored84%from 54 tests.

About plugin

  • Plugin page: bp-pinned-feed-no...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Sep 21, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 5
  • Update frequency: every 38.2 days
  • Top authors: giannis4 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /632 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Pinned Feed Notices for BuddyPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.61 ▼1.71
Dashboard /wp-admin3.31 ▲0.0148.32 ▼6.11
Posts /wp-admin/edit.php3.37 ▲0.0147.98 ▼5.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.26 ▼4.04
Media Library /wp-admin/upload.php3.24 ▲0.0037.47 ▲0.22

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pinned Feed Notices for BuddyPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.021.67 ▼0.0242.72 ▼2.56
Dashboard /wp-admin2,195 ▲215.59 ▲0.0584.88 ▼17.7939.12 ▼5.08
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0134.64 ▼1.7333.16 ▼3.26
Add New Post /wp-admin/post-new.php1,528 ▲223.18 ▲0.05631.21 ▼50.4759.04 ▲9.24
Media Library /wp-admin/upload.php1,397 ▼64.18 ▲0.01102.58 ▲1.0644.17 ▼1.09

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bp-pinned-feed-notices/bp-pinned-feed-notices.php:41

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: feed, buddypress, notices

bp-pinned-feed-notices/bp-pinned-feed-notices.php Passed 13 tests

The principal PHP file in "Pinned Feed Notices for BuddyPress" v. 1.0.2 is loaded by WordPress automatically on each request
57 characters long description:
Add custom notices to the top of the main activity feed.

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
Good job! No executable or dangerous file extensions detected397 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4100137326
JavaScript1161638
CSS14033

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.00
▷ Minimum class complexity12.00
▷ Maximum class complexity18.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin