79% bp-activity-plus-styling

Code Review | Buddypress Activity Plus Styling

WordPress plugin Buddypress Activity Plus Styling scored 79% from 54 tests.

About plugin

  • Plugin page: bp-activity-plus-...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.1
  • WordPress version: 6.3.1
  • First release: Apr 25, 2018
  • Latest release: May 1, 2019
  • Number of updates: 7
  • Update frequency: every 53.0 days
  • Top authors: markomaksym (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active / 4,627 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.37ms] Passed 4 tests

An overview of server-side resources used by Buddypress Activity Plus Styling
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.41 ▲1.44
Dashboard /wp-admin3.33 ▲0.0361.02 ▲10.84
Posts /wp-admin/edit.php3.44 ▲0.0946.87 ▲0.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0583.47 ▼18.08
Media Library /wp-admin/upload.php3.25 ▲0.0335.37 ▼1.44

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

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

Browser metrics Passed 4 tests

Buddypress Activity Plus Styling: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲21213.77 ▼0.618.21 ▲6.4142.39 ▼1.73
Dashboard /wp-admin2,235 ▲475.84 ▲0.05109.56 ▼2.9155.70 ▲10.50
Posts /wp-admin/edit.php2,118 ▲292.05 ▲0.0136.60 ▲1.1737.56 ▲3.68
Add New Post /wp-admin/post-new.php1,557 ▲4323.44 ▲5.85664.35 ▼2.8957.53 ▲5.74
Media Library /wp-admin/upload.php1,417 ▲264.27 ▲0.0697.23 ▼12.0745.03 ▼3.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/bp-activity-plus-styling/includes/class-basis-plugin-class.php+22
    Use of undefined constant WP_UNINSTALL_PLUGIN - assumed 'WP_UNINSTALL_PLUGIN' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 93% 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:
  • Tags: There are too many tags (20 tag instead of maximum 10)
The official readme.txt is a good inspiration

bp-activity-plus-styling/buddypress-activity-plus-styling.php 92% from 13 tests

The principal PHP file in "Buddypress Activity Plus Styling" v. 1.1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bp-activity-plus-styling.php" instead of "buddypress-activity-plus-styling.php")

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
No dangerous file extensions were detected3,562 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS38222,693
SVG100685
PHP69369131
JavaScript2521853

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods15
▷ Static methods320.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected