83% truanon-identity

Code Review | TruAnon Identity

WordPress plugin TruAnon Identity scored83%from 54 tests.

About plugin

  • Plugin page: truanon-identity
  • Plugin version: 2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Apr 16, 2021
  • Latest release: Dec 3, 2022
  • Number of updates: 31
  • Update frequency: every 19.3 days
  • Top authors: jtayler (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.79ms] Passed 4 tests

An overview of server-side resources used by TruAnon Identity
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.82 ▲1.75
Dashboard /wp-admin3.36 ▲0.0648.35 ▼9.63
Posts /wp-admin/edit.php3.48 ▲0.1245.72 ▼4.07
Add New Post /wp-admin/post-new.php5.94 ▲0.0694.30 ▼3.20
Media Library /wp-admin/upload.php3.29 ▲0.0640.66 ▲3.09

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
truanon_verification_options
widget_recent-comments
theysaidso_admin_options
truanon_db_version
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for TruAnon Identity
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.39 ▼1.289.31 ▲7.6347.50 ▲7.06
Dashboard /wp-admin2,208 ▲285.54 ▼0.1287.27 ▼3.2341.49 ▼2.62
Posts /wp-admin/edit.php2,116 ▲192.02 ▲0.0234.27 ▼3.9335.59 ▼4.95
Add New Post /wp-admin/post-new.php1,539 ▲1323.40 ▲0.37666.38 ▼1.2556.05 ▼3.84
Media Library /wp-admin/upload.php1,416 ▲134.23 ▲0.0894.19 ▼17.3048.10 ▲2.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • truanon_verification_options
    • can_compress_scripts
    • truanon_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/truanon-identity/includes/public/forms/ww-truanon-profile-display.php:2

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: identity, social, spam, safety, fraud...

truanon-identity/truanon-identity.php 77% from 13 tests

"TruAnon Identity" version 2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected753 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP9139245625
JavaScript22439122
CSS2046

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.44
Average class complexity10.75
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity3.05
▷ 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 methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/KnownHigh.png12.06KB5.01KB▼ 58.49%
includes/images/Unknown.png11.21KB4.70KB▼ 58.09%
includes/images/KnownLow.png12.01KB4.96KB▼ 58.71%
includes/images/01.png34.14KB8.47KB▼ 75.19%
includes/images/UnknownOwner.png11.99KB4.95KB▼ 58.75%