78% wp2pgpmail

Code Review | wp2pgpmail

WordPress plugin wp2pgpmail scored78%from 54 tests.

About plugin

  • Plugin page: wp2pgpmail
  • Plugin version: 1.28
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-6.2
  • WordPress version: 6.3.1
  • First release: May 24, 2010
  • Latest release: May 19, 2023
  • Number of updates: 57
  • Update frequency: every 83.2 days
  • Top authors: wp2pgpmail (57.89%)belaich (43.86%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /10,388 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
Installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼7.93ms] Passed 4 tests

Analyzing server-side resources used by wp2pgpmail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4243.41 ▲1.23
Dashboard /wp-admin3.78 ▲0.4450.95 ▼15.83
Posts /wp-admin/edit.php3.83 ▲0.4855.04 ▼0.02
Add New Post /wp-admin/post-new.php6.32 ▲0.4396.30 ▼17.09
Media Library /wp-admin/upload.php3.71 ▲0.4844.83 ▲1.42

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

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

Browser metrics Passed 4 tests

Checking browser requirements for wp2pgpmail
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲14814.25 ▼0.4246.68 ▲44.7442.37 ▲2.18
Dashboard /wp-admin2,210 ▲305.70 ▼0.0184.96 ▼6.4478.85 ▲34.09
Posts /wp-admin/edit.php2,133 ▲332.04 ▲0.0336.71 ▲0.8132.24 ▼0.49
Add New Post /wp-admin/post-new.php1,714 ▲18824.77 ▲7.25619.81 ▼37.0835.67 ▼17.43
Media Library /wp-admin/upload.php1,418 ▲214.19 ▲0.03102.84 ▼7.4182.14 ▲35.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp2pgpmail/phpcaptcha/securimage_show.php
    • > /wp-content/plugins/wp2pgpmail/phpcaptcha/example_form.php
    • > /wp-content/plugins/wp2pgpmail/phpcaptcha/securimage_play.php
    • > /wp-content/plugins/wp2pgpmail/phpcaptcha/example_form.ajax.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp2pgpmail/wp2pgpmail.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

wp2pgpmail/wp2pgpmail.php Passed 13 tests

The main file in "wp2pgpmail" v. 1.28 serves as a complement to information provided in readme.txt and as the entry point to the plugin
43 characters long description:
A simple PGP Mail Form Plugin for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected6,259 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP81,0351,9893,673
JavaScript102562071,561
PO File7274301727
Markdown1690175
HTML2262982
CSS21041

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity109.67
▷ Minimum class complexity1.00
▷ Maximum class complexity396.00
Average method complexity5.79
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods132
▷ Static methods96.82%
▷ Public methods7556.82%
▷ Protected methods5743.18%
▷ Private methods00.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants46
▷ Global constants00.00%
▷ Class constants46100.00%
▷ Public constants46100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
phpcaptcha/images/refresh.png4.72KB2.44KB▼ 48.36%
phpcaptcha/backgrounds/bg6.png41.88KB29.04KB▼ 30.64%
phpcaptcha/images/loading.png1.11KB1.10KB0.44%
images/reload.png0.34KB0.31KB▼ 9.20%
css/sprite.png11.62KB4.15KB▼ 64.30%