84% sightmill-nps

Code Review | SightMill Net Promoter Score (NPS) feedback surveys

WordPress plugin SightMill Net Promoter Score (NPS) feedback surveys scored84%from 54 tests.

About plugin

  • Plugin page: sightmill-nps
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2017
  • Latest release: Aug 29, 2019
  • Number of updates: 13
  • Update frequency: every 53.5 days
  • Top authors: sightmill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,116 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 gracefully, with no errors

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

An overview of server-side resources used by SightMill Net Promoter Score (NPS) feedback surveys
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.21 ▼1.45
Dashboard /wp-admin3.38 ▲0.0348.20 ▼19.18
Posts /wp-admin/edit.php3.49 ▲0.1449.31 ▲0.51
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.97 ▼16.07
Media Library /wp-admin/upload.php3.30 ▲0.0734.64 ▼2.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SightMill Net Promoter Score (NPS) feedback surveys
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.57 ▼0.745.38 ▲3.8639.42 ▼1.40
Dashboard /wp-admin2,209 ▲185.83 ▲0.74106.94 ▲1.5240.63 ▼1.67
Posts /wp-admin/edit.php2,098 ▲92.02 ▼0.0233.90 ▼5.9235.90 ▼2.73
Add New Post /wp-admin/post-new.php1,550 ▲723.61 ▲5.01651.91 ▲21.9452.57 ▼10.14
Media Library /wp-admin/upload.php1,394 ▲124.20 ▲0.0398.50 ▼0.7845.23 ▼0.46

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
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SightmillNps\\add_action() in wp-content/plugins/sightmill-nps/inc/admin/class-settings.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sightmill-nps/views/sidebar.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SightmillNps\\trailingslashit() in wp-content/plugins/sightmill-nps/sightmill-nps.php:183
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sightmill-nps/inc/public/functions-scripts-styles.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: feedback, nps, net promoter score, survey

sightmill-nps/sightmill-nps.php Passed 13 tests

The main PHP script in "SightMill Net Promoter Score (NPS) feedback surveys" version 1.0.3 is automatically included on every request by WordPress
61 characters long description:
Add a SightMill NPS customer feedback survey to your website.

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
Success! There were no dangerous files found in this plugin288 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5124346288

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.00
▷ Minimum class complexity7.00
▷ Maximum class complexity11.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods23
▷ Static methods28.70%
▷ Public methods1773.91%
▷ Protected methods00.00%
▷ Private methods626.09%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin