79% gd-bbpress-attachments

Code Review | GD bbPress Attachments

WordPress plugin GD bbPress Attachments scored79%from 54 tests.

About plugin

  • Plugin page: gd-bbpress-attach...
  • Plugin version: 4.6
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2011
  • Latest release: Jun 26, 2023
  • Number of updates: 121
  • Update frequency: every 35.7 days
  • Top authors: GDragoN (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

10,000+ active /266,101 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.16MB] [CPU: ▼3.21ms] Passed 4 tests

A check of server-side resources used by GD bbPress Attachments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1444.66 ▲2.37
Dashboard /wp-admin3.47 ▲0.1646.69 ▼2.87
Posts /wp-admin/edit.php3.59 ▲0.2343.27 ▼5.50
Add New Post /wp-admin/post-new.php6.05 ▲0.1688.95 ▼6.85
Media Library /wp-admin/upload.php3.40 ▲0.1637.56 ▲3.37
Attachments /wp-admin/edit.php?post_type=forum&page=gdbbpress_attachments3.2323.62

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
gd-bbpress-attachments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for GD bbPress Attachments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3113.26 ▼1.044.52 ▲2.7440.58 ▼0.71
Dashboard /wp-admin2,208 ▲205.84 ▼0.1694.46 ▼22.9538.97 ▼9.49
Posts /wp-admin/edit.php2,094 ▲51.96 ▼0.0234.00 ▼4.9434.71 ▼2.87
Add New Post /wp-admin/post-new.php1,535 ▼022.98 ▼0.19599.25 ▼74.4748.76 ▼18.00
Media Library /wp-admin/upload.php1,384 ▼74.34 ▲0.1395.11 ▼4.8640.38 ▼1.27
Attachments /wp-admin/edit.php?post_type=forum&page=gdbbpress_attachments280.440.063.95

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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • gd-bbpress-attachments
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/gd-bbpress-attachments/forms/tabs/about.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/gd-bbpress-attachments/forms/tabs/attachments.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/gd-bbpress-attachments/forms/tabs/advanced.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/gd-bbpress-attachments/forms/panels.php:6
    • > PHP Warning
      Use of undefined constant GDBBPRESSATTACHMENTS_PATH - assumed 'GDBBPRESSATTACHMENTS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gd-bbpress-attachments/forms/tabs/tools.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/gd-bbpress-attachments/forms/tabs/images.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'GDBBPRESSATTACHMENTS_PATHcode/tools.php' (include_path='.:/usr/share/php') in wp-content/plugins/gd-bbpress-attachments/forms/tabs/tools.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gd-bbpress-attachments/forms/uploader.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function d4p_get_post_attachments() in wp-content/plugins/gd-bbpress-attachments/forms/attachments/meta_files.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gd-bbpress-attachments/forms/attachments/meta_forum.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=forum&page=gdbbpress_attachments
    • > Network (severe)
    wp-admin/edit.php?post_type=forum&page=gdbbpress_attachments - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
10 plugin tags: limit, meta, topic, attachments, dev4press...

gd-bbpress-attachments/gd-bbpress-attachments.php Passed 13 tests

This is the main PHP file of "GD bbPress Attachments" version 4.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
136 characters long description:
Implements attachments upload to the topics and replies in bbPress plugin through media library and add additional forum based controls.

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
Success! There were no dangerous files found in this plugin2,354 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP21346621,699
Sass2660336
CSS4180292
JavaScript28227

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity22.57
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods58
▷ Static methods58.62%
▷ Public methods5696.55%
▷ Protected methods00.00%
▷ Private methods23.45%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/gfx/attachment.png3.09KB0.38KB▼ 87.53%
css/gfx/icons.png7.71KB2.64KB▼ 65.75%