84% bp-repost-activity

Code Review | BuddyPress Re-post Activity

WordPress plugin BuddyPress Re-post Activity scored 84% from 54 tests.

About plugin

  • Plugin page: bp-repost-activity
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Oct 13, 2019
  • Latest release: Apr 8, 2023
  • Number of updates: 7
  • Update frequency: every 181.9 days
  • Top authors: bhargavbhandari90 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 2,798 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.09MB] [CPU: ▼12.60ms] Passed 4 tests

This is a short check of server-side resources used by BuddyPress Re-post Activity
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▼0.0171.75 ▼48.70
Dashboard /wp-admin3.33 ▲0.0292.96 ▼16.31
Posts /wp-admin/edit.php3.44 ▼0.4095.43 ▲11.46
Add New Post /wp-admin/post-new.php5.91 ▲0.02215.82 ▲21.03
Media Library /wp-admin/upload.php3.25 ▲0.0270.86 ▲3.14

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Re-post Activity
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1414.23 ▼0.023.83 ▲0.3580.06 ▼6.02
Dashboard /wp-admin2,210 ▲74.82 ▼1.04216.75 ▲25.2794.10 ▲3.04
Posts /wp-admin/edit.php2,098 ▲92.04 ▲0.0784.51 ▲0.4161.25 ▼18.75
Add New Post /wp-admin/post-new.php1,378 ▲2417.78 ▼0.391,182.92 ▼65.8883.28 ▼2.91
Media Library /wp-admin/upload.php1,386 ▲44.19 ▲0.01214.11 ▲14.2098.41 ▼3.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bp-repost-activity/bp-repost-activity.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Re-post any activity by clicking on the "Re-Post" button screenshot-1.jpg.), #2 (Select where to re-post screenshot-2.jpg.), #3 (Enable/Disable re-post functionality screenshot-3.)
You can take inspiration from this readme.txt

bp-repost-activity/bp-repost-activity.php Passed 13 tests

The primary PHP file in "BuddyPress Re-post Activity" version 1.1.2 is used by WordPress to initiate all plugin functionality
17 characters long description:
Re-post activity.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin995 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10111212440
PHP4134207338
CSS3160120
YAML34056
PO File191141

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity25.00
▷ Minimum class complexity4.00
▷ Maximum class complexity46.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin