94% pgp-key-generator

Code Review | PGP Key Generator

WordPress plugin PGP Key Generator scored 94% from 54 tests.

About plugin

  • Plugin page: pgp-key-generator
  • Plugin version: 1.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-5.8
  • WordPress version: 5.8.1
  • First release: Mar 2, 2014
  • Latest release: Jul 18, 2021
  • Number of updates: 23
  • Update frequency: every 117.2 days
  • Top authors: wp2pgpmail (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active / 5,280 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by PGP Key Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1546.15 ▲24.02
Dashboard /wp-admin3.08 ▲0.0374.03 ▲22.23
Posts /wp-admin/edit.php3.14 ▲0.0366.76 ▲7.99
Add New Post /wp-admin/post-new.php5.44 ▲0.01123.13 ▼552.83
Media Library /wp-admin/upload.php3.03 ▲0.0251.89 ▼0.47

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

PGP Key Generator: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.96 ▲0.4910.24 ▼0.4859.54 ▲5.16
Dashboard /wp-admin2,964 ▲335.93 ▼0.04202.78 ▲25.78141.75 ▲18.11
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0283.99 ▲5.68110.56 ▲15.92
Add New Post /wp-admin/post-new.php1,581 ▼016.47 ▼1.23530.61 ▲37.21135.41 ▼12.03
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.03189.38 ▲0.25142.88 ▲5.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pgp-key-generator/pgp-key-generator.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt might help

pgp-key-generator/pgp-key-generator.php Passed 13 tests

"PGP Key Generator" version 1.13's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Generates PGP Keys. Runs completely in the browser.

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 detected380 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3713133
PHP149129
PO File1252762
CSS17056

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin