84% bbp-topic-like-button

Code Review | Topic Like Button for bbPress

WordPress plugin Topic Like Button for bbPress scored84%from 54 tests.

About plugin

  • Plugin page: bbp-topic-like-bu...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 25, 2018
  • Latest release: Oct 25, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: dahousecatz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,156 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Topic Like Button for bbPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.22 ▼7.43
Dashboard /wp-admin3.31 ▼0.0449.50 ▼16.20
Posts /wp-admin/edit.php3.36 ▲0.0051.81 ▼0.50
Add New Post /wp-admin/post-new.php5.89 ▲0.00114.35 ▲14.35
Media Library /wp-admin/upload.php3.23 ▲0.0036.17 ▼2.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Topic Like Button for bbPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.42 ▲0.221.70 ▼0.4542.73 ▼2.88
Dashboard /wp-admin2,206 ▲184.84 ▼0.02114.83 ▼0.3943.57 ▲0.74
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0439.91 ▲4.0435.55 ▼0.00
Add New Post /wp-admin/post-new.php1,539 ▲2022.96 ▼0.32627.26 ▼66.9856.23 ▼9.56
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0095.54 ▼13.8642.46 ▼2.96

Uninstaller [IO: ▲0.00MB] [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 detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/bbp-topic-like-button/inc/bbPtlbCheckReady.php:85

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: like, bbpress, topic, like button

bbp-topic-like-button/bbp-topic-like-button.php Passed 13 tests

"Topic Like Button for bbPress" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
58 characters long description:
Creates a function to add a like button on the topic page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin204 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34684161
JavaScript191643

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.50
▷ Minimum class complexity6.00
▷ Maximum class complexity15.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin