89% bp-email-assign-templates

Code Review | BP Email Assign Templates

WordPress plugin BP Email Assign Templates scored89%from 54 tests.

About plugin

  • Plugin page: bp-email-assign-t...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 18, 2016
  • Latest release: Dec 23, 2022
  • Number of updates: 37
  • Update frequency: every 66.8 days
  • Top authors: shanebp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /2,585 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.03ms] Passed 4 tests

Analyzing server-side resources used by BP Email Assign Templates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0347.15 ▲4.45
Dashboard /wp-admin3.32 ▲0.0244.63 ▼2.70
Posts /wp-admin/edit.php3.37 ▲0.0248.02 ▲3.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.21 ▼13.58
Media Library /wp-admin/upload.php3.24 ▲0.0234.30 ▲0.88

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for BP Email Assign Templates
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.19 ▼1.481.53 ▼0.4342.76 ▲0.00
Dashboard /wp-admin2,215 ▲245.85 ▲0.93106.50 ▲6.4838.65 ▼5.66
Posts /wp-admin/edit.php2,100 ▲112.01 ▼0.0140.63 ▲4.2837.73 ▲2.90
Add New Post /wp-admin/post-new.php1,554 ▲2118.28 ▼4.91641.15 ▼23.5153.82 ▲0.70
Media Library /wp-admin/upload.php1,403 ▲214.19 ▲0.0297.97 ▼1.0246.97 ▲4.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

bp-email-assign-templates/loader.php 85% from 13 tests

The main PHP script in "BP Email Assign Templates" version 1.5 is automatically included on every request by WordPress
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 ("bp-email-assign-templates.php" instead of "loader.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin879 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP543266879

PHP code Passed 2 tests

A brief analysis 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.32
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions57
▷ Named functions5698.25%
▷ Anonymous functions11.75%
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
There were not PNG files found in your plugin