88% pb-mailcrypt-antispam-email-encryption

Code Review | PB MailCrypt - AntiSpam Email Encryption

WordPress plugin PB MailCrypt - AntiSpam Email Encryption scored 88% from 54 tests.

About plugin

  • Plugin page: pb-mailcrypt-anti...
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 5.8.1
  • First release: Feb 8, 2013
  • Latest release: Oct 6, 2020
  • Number of updates: 40
  • Update frequency: every 72.2 days
  • Top authors: PascalBajorat (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 11,097 total downloads

Benchmarks

Plugin footprint Passed 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.03MB] [CPU: ▼143.28ms] Passed 4 tests

Analyzing server-side resources used by PB MailCrypt - AntiSpam Email Encryption
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.34 ▲12.19
Dashboard /wp-admin3.08 ▲0.0344.88 ▲1.27
Posts /wp-admin/edit.php3.17 ▲0.0634.39 ▼7.36
Add New Post /wp-admin/post-new.php5.44 ▲0.0187.40 ▼574.51
Media Library /wp-admin/upload.php3.02 ▲0.0233.59 ▲7.47
MailCrypt /wp-admin/options-general.php?page=pb-mailcrypt2.9730.69

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

PB MailCrypt - AntiSpam Email Encryption: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,838 ▲23216.27 ▲0.5914.82 ▲4.2047.00 ▼7.34
Dashboard /wp-admin2,997 ▲635.89 ▼0.14138.27 ▲0.05122.93 ▲19.40
Posts /wp-admin/edit.php2,766 ▲272.71 ▼0.0165.99 ▲0.4797.42 ▲4.98
Add New Post /wp-admin/post-new.php1,633 ▲13521.95 ▲3.15295.08 ▼78.11109.16 ▼4.36
Media Library /wp-admin/upload.php1,834 ▲245.05 ▲0.03163.01 ▲7.01129.43 ▲11.88
MailCrypt /wp-admin/options-general.php?page=pb-mailcrypt1,2392.1055.0590.87

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=pb-mailcrypt
    • > Notice in wp-content/plugins/pb-mailcrypt-antispam-email-encryption/inc/pbSettingsFramework.php+179
    Undefined index: prepend
    • > GET request to /wp-admin/options-general.php?page=pb-mailcrypt
    • > Notice in wp-content/plugins/pb-mailcrypt-antispam-email-encryption/inc/pbSettingsFramework.php+197
    Undefined index: append
    • > GET request to /wp-admin/options-general.php?page=pb-mailcrypt
    • > Warning in wp-content/plugins/pb-mailcrypt-antispam-email-encryption/inc/settings.php+198
    constant(): Couldn't find constant pbsfi_file

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=pb-mailcrypt
    • > Network (severe)
    wp-content/plugins/img/primusnote.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

pb-mailcrypt-antispam-email-encryption/pb-mailcrypt.php 92% from 13 tests

"PB MailCrypt - AntiSpam Email Encryption" version 3.1.0's primary PHP file adds more information about the plugin and serves as the entry point for 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 ("pb-mailcrypt-antispam-email-encryption.php" instead of "pb-mailcrypt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,009 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3113123468
Sass1381218
CSS121178
PO File13554121
JavaScript1143124

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.67
▷ Minimum class complexity7.00
▷ Maximum class complexity27.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods1995.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants11
▷ Global constants218.18%
▷ Class constants981.82%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/code.png26.40KB4.65KB▼ 82.39%
img/primusnote.png2.47KB1.27KB▼ 48.68%
img/warning.png20.55KB2.87KB▼ 86.03%
img/icon.png5.89KB2.87KB▼ 51.34%
img/mailcrypt.png5.89KB2.87KB▼ 51.34%