83% bbpress-info-widgets

Code Review | bbPress Info Widgets

WordPress plugin bbPress Info Widgets scored83%from 54 tests.

About plugin

  • Plugin page: bbpress-info-widgets
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2014
  • Latest release: Jul 3, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: MotleyFool (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,724 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.26ms] Passed 4 tests

Analyzing server-side resources used by bbPress Info Widgets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.86 ▲6.98
Dashboard /wp-admin3.37 ▲0.0751.75 ▼4.79
Posts /wp-admin/edit.php3.48 ▲0.1354.65 ▼4.04
Add New Post /wp-admin/post-new.php5.95 ▲0.0794.43 ▼5.74
Media Library /wp-admin/upload.php3.29 ▲0.0739.19 ▲1.54

Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/bbpress-info-widgets/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 13 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_bbpressforumcustom
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_bbpresstopicinfocustom
widget_bbpresstopicscustom
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for bbPress Info Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.26 ▼1.141.85 ▼0.3142.61 ▲2.11
Dashboard /wp-admin2,221 ▲184.86 ▼0.04110.61 ▲1.1342.02 ▲0.26
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0140.61 ▼0.2336.12 ▲0.19
Add New Post /wp-admin/post-new.php1,526 ▼1917.63 ▼5.19669.27 ▲18.7562.85 ▲7.55
Media Library /wp-admin/upload.php1,397 ▼04.24 ▲0.09110.18 ▼9.5347.46 ▼0.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • db_upgraded
    • widget_bbpresstopicinfocustom
    • theysaidso_admin_options
    • widget_bbpresstopicscustom
    • widget_recent-comments
    • widget_bbpressforumcustom
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MotleyFool\\BbpressWidgets\\add_action() in wp-content/plugins/bbpress-info-widgets/fool-wp-bbpress-widgets.php:41
    • > PHP Notice
      Undefined variable: widget_query in wp-content/plugins/bbpress-info-widgets/FoolWidgets/views/recenttopics-widget.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/bbpress-info-widgets/FoolWidgets/views/recenttopics-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bbpress-info-widgets/FoolWidgets/BBPressForumWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bbpress-info-widgets/FoolWidgets/views/topicinfo-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bbpress-info-widgets/FoolWidgets/BBPressTopicsWidget.php:7
    • > PHP Notice
      Undefined variable: widget_query in wp-content/plugins/bbpress-info-widgets/FoolWidgets/views/forum-widget.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/bbpress-info-widgets/FoolWidgets/views/forum-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_title() in wp-content/plugins/bbpress-info-widgets/FoolWidgets/views/topicinfo-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bbpress-info-widgets/FoolWidgets/views/forum-admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Topic Info widget displaying information about the topic being viewed. Custom CSS has been applied.), #2 (Forums Info widget (top) showing all forums with the number of topics and posts. Recent Topics widget (bottom) displays the most recent topics or the most popular topics. Custom CSS has been applied.)
The official readme.txt might help

bbpress-info-widgets/fool-wp-bbpress-widgets.php 69% from 13 tests

The main PHP file in "bbPress Info Widgets" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bbpress-info-widgets.php" instead of "fool-wp-bbpress-widgets.php")
  • Domain Path: The domain path must begin with a forward slash character ("//")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected317 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP108151317

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity5.33
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
2 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.00KB9.07KB▼ 39.52%
screenshot-2.png44.55KB23.95KB▼ 46.24%