72% happiness-reports-for-help-scout

Code Review | Satisfaction Reports from Help Scout

WordPress plugin Satisfaction Reports from Help Scout scored 72% from 54 tests.

About plugin

  • Plugin page: happiness-reports...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 5.8.1
  • First release: Nov 12, 2015
  • Latest release: Nov 24, 2020
  • Number of updates: 30
  • Update frequency: every 61.4 days
  • Top authors: hiren1612 (53.33%)sumobi (50%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,175 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.10MB] [CPU: ▼148.01ms] Passed 4 tests

Analyzing server-side resources used by Satisfaction Reports from Help Scout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.0329.78 ▼6.60
Dashboard /wp-admin3.21 ▲0.1541.62 ▼5.97
Posts /wp-admin/edit.php3.32 ▲0.2144.75 ▲3.72
Add New Post /wp-admin/post-new.php5.56 ▲0.1387.04 ▼572.33
Media Library /wp-admin/upload.php3.15 ▲0.1427.54 ▼7.14
Satisfaction Reports /wp-admin/options-general.php?page=satisfaction-reports-from-help-scout3.1029.63

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 1 new option
New WordPress options
help_scout_happiness_reports

Browser metrics Passed 4 tests

An overview of browser requirements for Satisfaction Reports from Help Scout
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,828 ▲23216.36 ▲0.8015.94 ▲6.1248.48 ▲2.70
Dashboard /wp-admin2,975 ▲415.93 ▼0.16134.65 ▼7.58119.08 ▼4.82
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0165.78 ▲1.3892.20 ▲6.24
Add New Post /wp-admin/post-new.php1,675 ▲318.76 ▼0.06378.56 ▼10.89108.96 ▲4.23
Media Library /wp-admin/upload.php1,827 ▲205.00 ▲0.01144.28 ▼9.06121.66 ▲6.20
Satisfaction Reports /wp-admin/options-general.php?page=satisfaction-reports-from-help-scout1,8122.0954.00129.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • help_scout_happiness_reports

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=satisfaction-reports-from-help-scout
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=satisfaction-reports-from-help-scout
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/happiness-reports-for-help-scout/webhook.php
  • 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/happiness-reports-for-help-scout/includes/scripts.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: helpscout, reviews, customer support, satisfaction ratings, help scout

happiness-reports-for-help-scout/happiness-reports-for-help-scout.php 77% from 13 tests

The entry point to "Satisfaction Reports from Help Scout" version 2.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("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: Please prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,984 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35463772,664
PHP7289389940
SVG100377
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.75
▷ Minimum class complexity3.00
▷ Maximum class complexity30.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods38
▷ Static methods25.26%
▷ Public methods3592.11%
▷ Protected methods00.00%
▷ Private methods37.89%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/right.png13.41KB6.38KB▼ 52.42%
includes/images/starfish-reviews-logo-final.png148.00KB67.13KB▼ 54.64%