84% sample-data-for-bbpress

Code Review | Sample data for bbPress

WordPress plugin Sample data for bbPress scored84%from 54 tests.

About plugin

  • Plugin page: sample-data-for-b...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2020
  • Latest release: Feb 18, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: casiepa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /829 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
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.74ms] Passed 4 tests

Analyzing server-side resources used by Sample data for bbPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1436.90 ▲0.16
Dashboard /wp-admin3.45 ▲0.1044.01 ▼13.39
Posts /wp-admin/edit.php3.50 ▲0.1448.63 ▲4.91
Add New Post /wp-admin/post-new.php6.03 ▲0.1482.03 ▼15.99
Media Library /wp-admin/upload.php3.37 ▲0.1435.10 ▲2.25

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sample data for bbPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.002.03 ▲0.4037.26 ▼7.28
Dashboard /wp-admin2,192 ▲155.59 ▼0.0982.67 ▼1.5540.17 ▼1.81
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0238.30 ▲4.5035.24 ▼3.00
Add New Post /wp-admin/post-new.php1,526 ▼023.57 ▲0.54693.04 ▲14.5457.13 ▲2.47
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0894.96 ▼10.5344.49 ▼0.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sample-data-for-bbpress/inc/admin.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: sample data, bbpress, unit testing

sample-data-for-bbpress/bbpress-sample-data.php 92% from 13 tests

Analyzing the main PHP file in "Sample data for bbPress" version 1.0.0
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 ("sample-data-for-bbpress.php" instead of "bbpress-sample-data.php")

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
Success! There were no dangerous files found in this plugin330 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33733330

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
PNG images were not found in this plugin