74% bp-activity-comment-like-dislike

Code Review | Comment Like Dislike for BuddyPress Activity

WordPress plugin Comment Like Dislike for BuddyPress Activity scored74%from 54 tests.

About plugin

  • Plugin page: bp-activity-comme...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 30, 2022
  • Latest release: Mar 30, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: dhavalkasvala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /388 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼11.79ms] Passed 4 tests

An overview of server-side resources used by Comment Like Dislike for BuddyPress Activity
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0037.23 ▼3.01
Dashboard /wp-admin3.35 ▲0.0051.30 ▼2.29
Posts /wp-admin/edit.php3.40 ▲0.0051.04 ▼3.86
Add New Post /wp-admin/post-new.php5.93 ▲0.0092.46 ▼37.99
Media Library /wp-admin/upload.php3.27 ▲0.0052.12 ▲17.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Comment Like Dislike for BuddyPress Activity
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.021.72 ▲0.1238.97 ▼2.42
Dashboard /wp-admin2,195 ▲305.62 ▼0.0689.65 ▼10.0640.79 ▼4.50
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0240.08 ▼5.1635.63 ▼1.73
Add New Post /wp-admin/post-new.php1,526 ▼223.13 ▼0.08660.49 ▲5.1654.75 ▲2.25
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0098.44 ▼17.2342.46 ▼2.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 tables detected upon uninstall: 1 table
    • wp_bb_updown_votes
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bp-activity-comment-like-dislike/includes/class-acld-vote-updown.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (The Comment Like Dislike for BuddyPress Activity work with only activity comment.)
You can look at the official readme.txt

bp-activity-comment-like-dislike/bp-activity-comment-like-dislike.php 92% from 13 tests

The entry point to "Comment Like Dislike for BuddyPress Activity" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

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
There were no executable files found in this plugin291 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32670237
JavaScript12054

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected