89% fernet-encryption

Code Review | Fernet Encryption

WordPress plugin Fernet Encryption scored89%from 54 tests.

About plugin

  • Plugin page: fernet-encryption
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 6.3.1
  • First release: Sep 2, 2021
  • Latest release: Apr 19, 2022
  • Number of updates: 15
  • Update frequency: every 15.3 days
  • Top authors: bhubbard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /908 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.50ms] Passed 4 tests

A check of server-side resources used by Fernet Encryption
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0742.69 ▲3.54
Dashboard /wp-admin3.41 ▲0.0748.07 ▼7.27
Posts /wp-admin/edit.php3.53 ▲0.1347.93 ▼5.26
Add New Post /wp-admin/post-new.php6.00 ▲0.0787.15 ▼16.42
Media Library /wp-admin/upload.php3.34 ▲0.0738.92 ▲2.96

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Fernet Encryption
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.29 ▼0.071.84 ▲0.1243.89 ▼0.66
Dashboard /wp-admin2,219 ▲395.57 ▲0.0688.05 ▼7.7442.44 ▲0.35
Posts /wp-admin/edit.php2,128 ▲252.16 ▲0.1937.37 ▼1.6337.19 ▼0.24
Add New Post /wp-admin/post-new.php1,526 ▼023.36 ▲0.16650.17 ▲20.2952.73 ▲1.76
Media Library /wp-admin/upload.php1,421 ▲214.30 ▼0.01104.47 ▲1.7447.07 ▼0.28

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: security, fernet, encryption

fernet-encryption/fernet-encryption.php 85% from 13 tests

This is the main PHP file of "Fernet Encryption" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/i18n/languages/")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "5.5")

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
Success! There were no dangerous files found in this plugin451 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7106392390
YAML21046
Markdown16015

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods315.79%
▷ Public methods1684.21%
▷ Protected methods315.79%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-1544x500.png32.35KB16.05KB▼ 50.38%
.wordpress-org/icon-256x256.png10.78KB5.88KB▼ 45.47%
.wordpress-org/banner-772x250.png18.83KB9.11KB▼ 51.62%
.wordpress-org/icon-128x128.png3.64KB2.59KB▼ 28.89%