84% bbp-notify-admins

Code Review | bbPress Notify Admins

WordPress plugin bbPress Notify Admins scored84%from 54 tests.

About plugin

  • Plugin page: bbp-notify-admins
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 10, 2015
  • Latest release: Jul 8, 2018
  • Number of updates: 6
  • Update frequency: every 177.2 days
  • Top authors: sbrajesh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /3,201 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.69ms] Passed 4 tests

Analyzing server-side resources used by bbPress Notify Admins
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0549.95 ▲9.60
Dashboard /wp-admin3.35 ▲0.0454.17 ▼2.58
Posts /wp-admin/edit.php3.40 ▲0.0450.20 ▼3.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.96 ▼19.04
Media Library /wp-admin/upload.php3.27 ▲0.0436.70 ▼1.60

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

bbPress Notify Admins: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.372.14 ▲0.4942.03 ▲0.20
Dashboard /wp-admin2,195 ▲235.58 ▼0.1298.64 ▼5.5242.72 ▼3.42
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0037.03 ▲2.0331.84 ▼5.59
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.05661.73 ▼10.4864.69 ▲9.04
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.0895.50 ▼3.4047.11 ▼1.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bbp-notify-admins/bbp-notify-admin.php:62

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: forum-notifications, notifications, bbpress, admin notifications

bbp-notify-admins/bbp-notify-admin.php 92% from 13 tests

This is the main PHP file of "bbPress Notify Admins" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bbp-notify-admins.php" instead of "bbp-notify-admin.php")

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
Good job! No executable or dangerous file extensions detected187 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2100136187

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods750.00%
▷ Protected methods00.00%
▷ Private methods750.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin