78% bbpress-post-via-mail

Code Review | bbPress Post via Mail

WordPress plugin bbPress Post via Mail scored78%from 54 tests.

About plugin

  • Plugin page: bbpress-post-via-...
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 16, 2015
  • Latest release: Sep 22, 2015
  • Number of updates: 55
  • Update frequency: every 1.2 days
  • Top authors: Unicornis (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,727 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.49MB] [CPU: ▼0.11ms] Passed 4 tests

An overview of server-side resources used by bbPress Post via Mail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2337.96 ▼3.87
Dashboard /wp-admin3.89 ▲0.5951.87 ▲0.35
Posts /wp-admin/edit.php3.94 ▲0.5852.55 ▲7.27
Add New Post /wp-admin/post-new.php6.47 ▲0.5886.27 ▼1.74
Media Library /wp-admin/upload.php3.81 ▲0.5836.98 ▲4.84
bbPress Post Via Mail /wp-admin/options-general.php?page=bb_pvm_options3.7243.18

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for bbPress Post via Mail
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲18514.47 ▲0.181.85 ▼0.0539.20 ▼10.89
Dashboard /wp-admin2,301 ▲1134.88 ▼1.02109.34 ▲4.1841.68 ▼1.89
Posts /wp-admin/edit.php2,099 ▲102.03 ▲0.0239.38 ▲3.4033.91 ▼0.56
Add New Post /wp-admin/post-new.php1,521 ▼2217.47 ▼1.09680.89 ▲23.6365.45 ▲8.00
Media Library /wp-admin/upload.php1,399 ▲144.20 ▼0.04104.02 ▲1.9145.61 ▲2.11
bbPress Post Via Mail /wp-admin/options-general.php?page=bb_pvm_options1,1271.7224.8131.21

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 were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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

SRP 0% 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bbpress-post-via-mail/vendor/postmark-inbound/example/without_composer/index.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(wp-content/plugins/bbpress-post-via-mail/vendor/EmailReplyParser/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/bbpress-post-via-mail/vendor/EmailReplyParser/tests/bootstrap.php on line 3
    • > PHP Warning
      Use of undefined constant PVM_PATH - assumed 'PVM_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bbpress-post-via-mail/library/pvm/Handler/Postmark.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Postmark\\Inbound' not found in wp-content/plugins/bbpress-post-via-mail/vendor/postmark-inbound/lib/Postmark/Attachments.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bbpress-post-via-mail/bbpress-pvm.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'pvm_Handler' not found in wp-content/plugins/bbpress-post-via-mail/library/pvm/Handler/Mandrill.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/bbpress-post-via-mail/vendor/EmailReplyParser/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/bbpress-post-via-mail/vendor/EmailReplyParser/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'pvm_Autohooker' not found in wp-content/plugins/bbpress-post-via-mail/library/pvm.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/bbpress-post-via-mail/vendor/EmailReplyParser/tests/EmailReplyParser/Tests/TestCase.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Postmark\\Inbound' not found in wp-content/plugins/bbpress-post-via-mail/vendor/postmark-inbound/lib/Postmark/Attachment.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Postmark\\Inbound' not found in wp-content/plugins/bbpress-post-via-mail/vendor/postmark-inbound/example/with_composer/index.php:6

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

bbpress-post-via-mail/bbpress-pvm.php 92% from 13 tests

The main PHP file in "bbPress Post via Mail" ver. 1.2.8 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bbpress-post-via-mail.php" instead of "bbpress-pvm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin5,508 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP439301,4264,181
PO File2269289822
Markdown41200260
JSON500185
XML22045
YAML24015

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.57
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes29
▷ Abstract classes13.45%
▷ Concrete classes2896.55%
▷ Final classes27.14%
Methods348
▷ Static methods14541.67%
▷ Public methods29283.91%
▷ Protected methods4512.93%
▷ Private methods113.16%
Functions22
▷ Named functions731.82%
▷ Anonymous functions1568.18%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin