10% activity-reactions-for-buddypress

Code Review | Activity Reactions For Buddypress

WordPress plugin Activity Reactions For Buddypressscored10%from 54 tests.

About plugin

  • Plugin page: activity-reaction...
  • Plugin version: 1.0.22
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 6.3.1
  • First release: Jul 11, 2016
  • Latest release: Jul 28, 2017
  • Number of updates: 62
  • Update frequency: every 7.1 days
  • Top authors: arete-it (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

500+ active /29,783 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method arete_buddypress_smileys_setting::arete_create_table() should not be called statically

Server metrics [RAM: ▲0.32MB] [CPU: ▼9.32ms] Passed 4 tests

A check of server-side resources used by Activity Reactions For Buddypress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3927.83 ▼14.67
Dashboard /wp-admin3.60 ▲0.3046.34 ▼4.72
Posts /wp-admin/edit.php3.72 ▲0.3647.49 ▲2.26
Add New Post /wp-admin/post-new.php6.20 ▲0.3280.76 ▼20.13
Media Library /wp-admin/upload.php3.53 ▲0.3038.57 ▲4.86
Settings /wp-admin/admin.php?page=activity-reactions-for-buddypress/activity-reactions-for-buddypress.php/ai_bp_settings3.5033.09
Reactions /wp-admin/admin.php?page=activity-reactions-for-buddypress/activity-reactions-for-buddypress.php/settings3.5131.11

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 27 new files
Database: 3 new tables, 7 new options
New tables
wp_arete_buddypress_smileys_manage
wp_arete_buddypress_smileys
wp_arete_buddypress_smiley_settings
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
version
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Activity Reactions For Buddypress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,495 ▼27613.55 ▼0.830.50 ▼1.3817.23 ▼28.40
Dashboard /wp-admin2,239 ▲514.94 ▼0.94100.40 ▼14.0281.06 ▲35.94
Posts /wp-admin/edit.php2,119 ▲272.07 ▲0.0738.79 ▼5.0631.57 ▲0.85
Add New Post /wp-admin/post-new.php1,694 ▲16122.53 ▲4.49705.64 ▲82.2572.39 ▲22.74
Media Library /wp-admin/upload.php1,403 ▲184.26 ▲0.07102.07 ▲2.93106.10 ▲62.52
Settings /wp-admin/admin.php?page=activity-reactions-for-buddypress/activity-reactions-for-buddypress.php/ai_bp_settings8071.7624.9022.95
Reactions /wp-admin/admin.php?page=activity-reactions-for-buddypress/activity-reactions-for-buddypress.php/settings8071.7326.1824.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_arete_buddypress_smileys_manage
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • version
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/activity-reactions-for-buddypress/css/ai_bp_reactions_dynamic_css.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/activity-reactions-for-buddypress/core.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/activity-reactions-for-buddypress/core.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/activity-reactions-for-buddypress/core.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/activity-reactions-for-buddypress/class/class.php:159

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === Activity Reactions For Buddypress=== )
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

activity-reactions-for-buddypress/activity-reactions-for-buddypress.php Passed 13 tests

The main file in "Activity Reactions For Buddypress" v. 1.0.22 serves as a complement to information provided in readme.txt and as the entry point to the plugin
91 characters long description:
A plugin for providing registered users option to show their reactions on activity updates.

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 detected3,969 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP51653043,727
JavaScript42912223
CSS45419

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.33
▷ Minimum class complexity6.00
▷ Maximum class complexity19.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
11 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/sad.png1.88KB2.00KB0.00%
img/unlike.png0.72KB0.65KB▼ 10.53%
img/like.png1.24KB1.33KB0.00%
img/love.png0.91KB1.01KB0.00%
img/haha.png1.53KB1.63KB0.00%