83% trusty-whistleblowing-solution

Code Review | Trusty Whistleblowing Solution

WordPress plugin Trusty Whistleblowing Solution scored83%from 54 tests.

About plugin

  • Plugin page: trusty-whistleblo...
  • Plugin version: 1.4.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Apr 1, 2022
  • Latest release: Aug 31, 2022
  • Number of updates: 13
  • Update frequency: every 11.8 days
  • Top authors: trustyreport (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /1,216 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.05ms] Passed 4 tests

A check of server-side resources used by Trusty Whistleblowing Solution
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.59 ▼6.56
Dashboard /wp-admin3.39 ▲0.0848.57 ▼5.45
Posts /wp-admin/edit.php3.50 ▲0.1451.35 ▼0.44
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.62 ▼19.75
Media Library /wp-admin/upload.php3.31 ▲0.0840.22 ▲2.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Trusty Whistleblowing Solution
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.28 ▼1.094.30 ▲2.2944.43 ▲1.12
Dashboard /wp-admin2,234 ▲524.92 ▼0.94112.09 ▲6.7886.56 ▲43.85
Posts /wp-admin/edit.php2,117 ▲282.01 ▼0.0434.62 ▲0.0630.20 ▼4.07
Add New Post /wp-admin/post-new.php1,541 ▼123.27 ▲5.07697.61 ▲38.0363.44 ▲2.19
Media Library /wp-admin/upload.php1,410 ▲224.26 ▼0.11107.46 ▲0.1366.52 ▲19.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/trusty-whistleblowing-solution/templates/form.tpl.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% 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
5 plugin tags: hinweisgebersystem, whistleblowing, whistleblowing solution, hinweisgeberlsung, whistleblower

trusty-whistleblowing-solution/tr-free-whistleblowing-solution.php 69% from 13 tests

The entry point to "Trusty Whistleblowing Solution" version 1.4.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: Please don't use more than 140 characters for the plugin description (currently 331 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("trusty-whistleblowing-solution.php" instead of "tr-free-whistleblowing-solution.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,206 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8151353722
CSS1106270
JavaScript13727214

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods2184.00%
▷ Protected methods00.00%
▷ Private methods416.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/WBS.png40.36KB12.89KB▼ 68.06%