10% bbpress-topic-sections

Code Review | bbPress Topic Sections

WordPress plugin bbPress Topic Sections scored 10% from 54 tests.

About plugin

  • Plugin page: bbpress-topic-sec...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 8, 2013
  • Latest release: Nov 1, 2013
  • Number of updates: 7
  • Update frequency: every 38.0 days
  • Top authors: grosbouff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,406 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/bbpress-topic-sections/bbp_ts-admin.php+41
    Accessing static property bbP_Topic_Sections_Admin::$db_version_option_name as non static

Server metrics [RAM: ▼1.24MB] [CPU: ▼50.16ms] Passed 4 tests

Server-side resources used by bbPress Topic Sections
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4040.28 ▼4.46
Dashboard /wp-admin2.70 ▼0.608.27 ▼42.22
Posts /wp-admin/edit.php2.70 ▼0.6511.76 ▼35.60
Add New Post /wp-admin/post-new.php2.70 ▼3.1810.25 ▼97.93
Media Library /wp-admin/upload.php2.70 ▼0.527.59 ▼24.90

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 14 new files
Database: 1 new table, 7 new options
New tables
wp_topic_sectionmeta
New WordPress options
widget_recent-comments
can_compress_scripts
_bbp-ts_db_version
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for bbPress Topic Sections
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.28 ▼1.111.71 ▼0.3739.73 ▼2.95
Dashboard /wp-admin2,206 ▲155.91 ▲1.00105.27 ▲3.0837.97 ▼9.30
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0440.72 ▲3.8335.21 ▼0.50
Add New Post /wp-admin/post-new.php1,533 ▲1922.99 ▲5.47652.73 ▼4.3366.06 ▲17.01
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0097.35 ▼3.6942.95 ▼3.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/bbpress-topic-sections/bbp_ts-admin.php+41
    Accessing static property bbP_Topic_Sections_Admin::$db_version_option_name as non static
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_topic_sectionmeta
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • _bbp-ts_db_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bbpress-topic-sections/theme/form-topic_sections.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bbpress-topic-sections/theme/content-single-topic_section.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bbpress-topic-sections/theme/loop-topic_sections.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bbp_ts_section_classes() in wp-content/plugins/bbpress-topic-sections/theme/form-single-topic_section.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bbpress-topic-sections/bbpress-topic-sections.php:98

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tested up to: Invalid version format
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

bbpress-topic-sections/bbpress-topic-sections.php 92% from 13 tests

Analyzing the main PHP file in "bbPress Topic Sections" version 1.0.3
It is important to 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,959 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP84904471,828
PO File23636107
CSS16024

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity89.50
▷ Minimum class complexity8.00
▷ Maximum class complexity197.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods120
▷ Static methods32.50%
▷ Public methods10285.00%
▷ Protected methods1613.33%
▷ Private methods21.67%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
There are no PNG files in this plugin