73% shortcodes-for-bbpress

Code Review | Shortcodes for Bbpress

WordPress plugin Shortcodes for Bbpress scored73%from 54 tests.

About plugin

  • Plugin page: shortcodes-for-bb...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 6, 2020
  • Latest release: Jun 14, 2023
  • Number of updates: 40
  • Update frequency: every 23.8 days
  • Top authors: lightimagemedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /739 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.94MB] [CPU: ▼40.83ms] Passed 4 tests

A check of server-side resources used by Shortcodes for Bbpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.85 ▲2.81
Dashboard /wp-admin3.02 ▼0.3325.21 ▼41.76
Posts /wp-admin/edit.php3.02 ▼0.3426.14 ▼24.37
Add New Post /wp-admin/post-new.php3.02 ▼2.8722.47 ▼87.52
Media Library /wp-admin/upload.php3.02 ▼0.2124.53 ▼9.68

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Shortcodes for Bbpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲13413.45 ▼1.198.54 ▲7.0743.00 ▲3.67
Dashboard /wp-admin2,221 ▲405.63 ▼0.0890.52 ▼10.4539.29 ▼2.10
Posts /wp-admin/edit.php2,123 ▲232.01 ▲0.0639.48 ▲1.1535.91 ▲0.74
Add New Post /wp-admin/post-new.php1,548 ▲2023.08 ▲0.05786.84 ▲175.1054.99 ▼10.39
Media Library /wp-admin/upload.php1,426 ▲264.20 ▲0.0695.57 ▼14.9141.25 ▼6.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/shortcodes-for-bbpress/inc/admin/class-admin.php+117
    Undefined variable: ajax_form_page_hook
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/shortcodes-for-bbpress/inc/frontend/views/html-prwirepro-press-release-newsroom-frontend-display.php
    • > /wp-content/plugins/shortcodes-for-bbpress/inc/admin/views/partials-html-form-view.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% 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: Screenshot #1 (Main screen) image required
The official readme.txt is a good inspiration

shortcodes-for-bbpress/Shortcodes for bbpress.php 85% from 13 tests

The entry point to "Shortcodes for Bbpress" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shortcodes-for-bbpress.php" instead of "Shortcodes for bbpress.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 189 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin396 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP132,457499330
HTML15041
JavaScript2123625
CSS22100

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods31
▷ Static methods39.68%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/assets/images/title.png6.69KB3.82KB▼ 42.81%
icon-16x16.png0.51KB0.37KB▼ 27.86%