78% bbpress-notify-nospam

Code Review | bbPress Notify (No-Spam)

WordPress plugin bbPress Notify (No-Spam) scored78%from 54 tests.

About plugin

  • Plugin page: bbpress-notify-no...
  • Plugin version: 2.18.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2013
  • Latest release: Nov 19, 2023
  • Number of updates: 632
  • Update frequency: every 6.2 days
  • Top authors: useStrict (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

4,000+ active /248,570 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.07ms] Passed 4 tests

An overview of server-side resources used by bbPress Notify (No-Spam)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.34 ▼2.23
Dashboard /wp-admin3.35 ▲0.0543.87 ▼5.39
Posts /wp-admin/edit.php3.46 ▲0.1146.44 ▼1.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.97 ▲6.60
Media Library /wp-admin/upload.php3.27 ▲0.0432.62 ▲1.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for bbPress Notify (No-Spam)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.72 ▲0.581.65 ▲0.0143.50 ▼2.66
Dashboard /wp-admin2,204 ▲335.57 ▲0.0888.84 ▼4.1142.27 ▼0.20
Posts /wp-admin/edit.php2,110 ▲101.94 ▼0.0241.21 ▲3.2337.43 ▲1.66
Add New Post /wp-admin/post-new.php1,538 ▲1223.27 ▲0.22592.00 ▼76.9363.39 ▲3.95
Media Library /wp-admin/upload.php1,409 ▲124.19 ▼0.0197.08 ▼7.6145.81 ▲1.75

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 18× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/bbpress-notify-nospam/includes/view/settings.class.php
    • > /wp-content/plugins/bbpress-notify-nospam/includes/helper/converter.class.php
    • > /wp-content/plugins/bbpress-notify-nospam/t/data/template_for_test.tmpl.php
    • > /wp-content/plugins/bbpress-notify-nospam/includes/dal/dry_run_dao.class.php
    • > /wp-content/plugins/bbpress-notify-nospam/includes/controller/ajax.class.php
    • > /wp-content/plugins/bbpress-notify-nospam/includes/controller/admin_core.class.php
    • > /wp-content/plugins/bbpress-notify-nospam/bbpress-notify-nospam.php
    • > /wp-content/plugins/bbpress-notify-nospam/includes/model/ajax_request.class.php
    • > /wp-content/plugins/bbpress-notify-nospam/includes/dal/settings_dao.class.php
    • > /wp-content/plugins/bbpress-notify-nospam/includes/dal/addons_dao.class.php
  • 38× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATH/wp-content/plugins/bbpress-notify-nospam/bbpress-notify-nospam.php): failed to open stream: No such file or directory in wp-content/plugins/bbpress-notify-nospam/t/bbPress_Notify_noSpam_Child.class.php on line 6
    • > PHP Warning
      require_once(ABSPATH/wp-content/plugins/bbpress-notify-nospam/bbpress-notify-nospam.php): failed to open stream: No such file or directory in wp-content/plugins/bbpress-notify-nospam/t/bbPress_Notify_noSpam_Child.class.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bbpress-notify-nospam/includes/view/templates/plugin_settings.tmpl.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-content/plugins/bbpress/bbpress.php' (include_path='.:/usr/share/php') in wp-content/plugins/bbpress-notify-nospam/t/00-notify.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-content/plugins/bbpress-notify-nospam/bbpress-notify-nospam.php' (include_path='.:/usr/share/php') in wp-content/plugins/bbpress-notify-nospam/t/bbPress_Notify_noSpam_Child.class.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bbpress-notify-nospam/t/bbPress_Notify_noSpam_Child.class.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bbpress-notify-nospam/includes/view/templates/settings/replies_body.tmpl.php:1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bbpress-notify-nospam/t/bbPress_Notify_noSpam_Child.class.php on line 6
    • > PHP Notice
      Trying to get property 'foo' of non-object in wp-content/plugins/bbpress-notify-nospam/t/data/template_for_test.tmpl.php on line 1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bbpress-notify-nospam/t/bbPress_Notify_noSpam_Child.class.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The settings page - General tab), #2 (The settings page - Topics tab), #3 (The settings page - Replies tab), #4 (The settings page - Support tab)
Please take inspiration from this readme.txt

bbpress-notify-nospam/bbpress-notify-nospam.php 92% from 13 tests

The main file in "bbPress Notify (No-Spam)" v. 2.18.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 257 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,879 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,4211,1764,312
PO File1133150418
JavaScript316677
CSS313072

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.77
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods203
▷ Static methods41.97%
▷ Public methods18088.67%
▷ Protected methods83.94%
▷ Private methods157.39%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.26MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png42.04KB43.43KB0.00%
screenshot-4.png43.84KB45.25KB0.00%
screenshot-2.png88.62KB92.69KB0.00%
screenshot-3.png91.46KB95.66KB0.00%