90% bbpress-report-content

Code Review | bbPress - Report Content

WordPress plugin bbPress - Report Content scored90%from 54 tests.

About plugin

  • Plugin page: bbpress-report-co...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Nov 12, 2014
  • Number of updates: 17
  • Update frequency: every 24.1 days
  • Top authors: jjeaton (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

300+ active /14,926 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.53ms] Passed 4 tests

Analyzing server-side resources used by bbPress - Report Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.05 ▲2.17
Dashboard /wp-admin3.31 ▼0.0448.53 ▼15.82
Posts /wp-admin/edit.php3.36 ▲0.0059.05 ▲6.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.70 ▼11.63
Media Library /wp-admin/upload.php3.23 ▲0.0039.38 ▲3.17

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for bbPress - Report Content
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.002.07 ▲0.1640.58 ▼2.73
Dashboard /wp-admin2,195 ▲215.59 ▼0.0889.07 ▼12.9938.05 ▼4.26
Posts /wp-admin/edit.php2,103 ▼01.98 ▲0.0340.32 ▲5.6938.13 ▲3.25
Add New Post /wp-admin/post-new.php1,526 ▼023.32 ▲0.29658.91 ▼33.1561.06 ▲9.45
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.00113.71 ▼1.5447.99 ▲2.24

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (The report link displayed in the topic admin links list.), #2 (Topics admin screen, showing the custom "User Reported" status.), #3 (Front end display of a reported topic.)
You can take inspiration from this readme.txt

bbpress-report-content/bbpress-report-content.php Passed 13 tests

This is the main PHP file of "bbPress - Report Content" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
67 characters long description:
Allows users to report inappropriate content in topics and replies.

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
Everything looks great! No dangerous files found in this plugin1,178 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File7194292621
PHP3249482557

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity127.00
▷ Minimum class complexity127.00
▷ Maximum class complexity127.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods513.51%
▷ Public methods3697.30%
▷ Protected methods00.00%
▷ Private methods12.70%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png26.13KB8.00KB▼ 69.41%
screenshot-3.png119.66KB34.92KB▼ 70.82%
screenshot-2.png67.84KB22.85KB▼ 66.32%