89% learnpress-bbpress

Code Review | LearnPress - bbPress Integration

WordPress plugin LearnPress - bbPress Integration scored89%from 54 tests.

About plugin

  • Plugin page: learnpress-bbpress
  • Plugin version: 4.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: May 26, 2022
  • Number of updates: 50
  • Update frequency: every 50.7 days
  • Top authors: thongta (32%)ThimPress (28%)tunnhn (26%)leehld (16%)kendy73 (4%)

Code review

54 tests

User reviews

1 review

Install metrics

5,000+ active /235,786 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.01MB] [CPU: ▼14.50ms] Passed 4 tests

Server-side resources used by LearnPress - bbPress Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.26 ▼18.65
Dashboard /wp-admin3.31 ▼0.0447.70 ▼13.80
Posts /wp-admin/edit.php3.36 ▲0.0047.25 ▼3.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.78 ▼21.94
Media Library /wp-admin/upload.php3.23 ▲0.0042.54 ▲7.33

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by LearnPress - bbPress Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.71 ▲0.121.78 ▲0.3142.79 ▲2.27
Dashboard /wp-admin2,195 ▲155.55 ▼0.0390.07 ▼5.4038.11 ▼4.16
Posts /wp-admin/edit.php2,100 ▼31.96 ▲0.0237.96 ▼0.9834.68 ▲2.34
Add New Post /wp-admin/post-new.php1,526 ▼523.22 ▲0.02695.09 ▲27.2261.57 ▼9.43
Media Library /wp-admin/upload.php1,394 ▼34.18 ▼0.0297.71 ▼7.8742.77 ▼3.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (LearnPress bbPress screenshot) image missing
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

learnpress-bbpress/learnpress-bbpress.php Passed 13 tests

The main file in "LearnPress - bbPress Integration" v. 4.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
48 characters long description:
Using the forum for courses provided by bbPress.

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
No dangerous file extensions were detected611 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5128194568
CSS22026
JavaScript14117

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.40
Average class complexity31.00
▷ Minimum class complexity8.00
▷ Maximum class complexity54.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods1676.19%
▷ Protected methods314.29%
▷ Private methods29.52%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants6
▷ Global constants6100.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