84% usersnap

Code Review | Usersnap

WordPress plugin Usersnap scored84%from 54 tests.

About plugin

  • Plugin page: usersnap
  • Plugin version: 4.18
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2011
  • Latest release: Feb 6, 2023
  • Number of updates: 143
  • Update frequency: every 28.7 days
  • Top authors: usersnap (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /41,961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.30ms] Passed 4 tests

Server-side resources used by Usersnap
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.31 ▼2.41
Dashboard /wp-admin3.37 ▲0.0345.32 ▼13.11
Posts /wp-admin/edit.php3.42 ▲0.0747.88 ▲0.14
Add New Post /wp-admin/post-new.php5.95 ▲0.0790.28 ▼9.40
Media Library /wp-admin/upload.php3.29 ▲0.0735.26 ▼0.27
Usersnap /wp-admin/options-general.php?page=usersnap/usersnap.php3.2629.65

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Usersnap
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9913.79 ▼0.561.75 ▼0.1838.23 ▼4.12
Dashboard /wp-admin2,251 ▲594.94 ▼0.01105.39 ▼9.5840.37 ▼0.54
Posts /wp-admin/edit.php2,137 ▲512.38 ▲0.3446.65 ▲11.4236.58 ▲7.05
Add New Post /wp-admin/post-new.php1,526 ▲717.75 ▼5.40686.09 ▲20.1258.19 ▲5.64
Media Library /wp-admin/upload.php1,436 ▲454.34 ▲0.12110.34 ▲15.4345.83 ▲4.93
Usersnap /wp-admin/options-general.php?page=usersnap/usersnap.php7962.1825.1427.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/usersnap/usersnap.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 85 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (This screenshot shows the admin page of the Usersnap plugin.), #2 (The initial setup page where you can create an api key!), #3 (Let users show you exactly what they experience, with all the contextual data included.), #4 (Get visual tickets with the screenshot mode to draw and pin comments, or screen record.), #5 (Build your web application the customer-centric way.), #6 (See the status of all feedback items in the inbox and dashboard.)
The official readme.txt is a good inspiration

usersnap/usersnap.php Passed 13 tests

The principal PHP file in "Usersnap" v. 4.18 is loaded by WordPress automatically on each request
108 characters long description:
Usersnap helps website owners to get feedback in form of screenshots from their customers, readers or users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin508 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15745493
CSS13015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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.38MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png84.17KB26.63KB▼ 68.36%
screenshot-6.png24.38KB20.66KB▼ 15.25%
screenshot-2.png104.49KB43.82KB▼ 58.06%
usersnap_16x16.png1.21KB0.65KB▼ 46.82%
usersnap_32x32.png1.92KB1.32KB▼ 31.06%