78% nps-monitoring

Code Review | NPS Monitoring

WordPress plugin NPS Monitoring scored78%from 54 tests.

About plugin

  • Plugin page: nps-monitoring
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: May 30, 2013
  • Latest release: Sep 5, 2013
  • Number of updates: 10
  • Update frequency: every 9.8 days
  • Top authors: benhallbenhall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,653 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
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.18ms] Passed 4 tests

Analyzing server-side resources used by NPS Monitoring
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.82 ▲2.39
Dashboard /wp-admin3.31 ▼0.0348.33 ▼15.94
Posts /wp-admin/edit.php3.36 ▲0.0049.66 ▲1.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.78 ▼7.41
Media Library /wp-admin/upload.php3.23 ▲0.0036.70 ▲1.13
NPS Monitoring /wp-admin/options-general.php?page=npsm-plugin-options3.1831.41

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for NPS Monitoring
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.251.67 ▼0.1240.07 ▼4.08
Dashboard /wp-admin2,199 ▲225.66 ▲0.1090.60 ▼7.9841.10 ▲4.15
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0738.98 ▲2.2035.34 ▼0.90
Add New Post /wp-admin/post-new.php1,529 ▲123.54 ▲0.56694.29 ▲77.9755.82 ▲1.40
Media Library /wp-admin/upload.php1,404 ▲44.26 ▲0.12112.15 ▲15.2847.69 ▲5.92
NPS Monitoring /wp-admin/options-general.php?page=npsm-plugin-options9893.0570.1228.94

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=npsm-plugin-options
    • > Warning in wp-content/plugins/nps-monitoring/index.php+220
    Use of undefined constant URL_ROOT - assumed 'URL_ROOT' (this will throw an Error in a future version of PHP)

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=npsm-plugin-options
    • > Network (severe)
    https://www.dimbal.com/dbm/banner/dbm.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: The official readme.txt might help

nps-monitoring/index.php 92% from 13 tests

Analyzing the main PHP file in "NPS Monitoring" version 2.1.2
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nps-monitoring.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected133 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP146100133

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions4
▷ Named functions4100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
guage_180.png36.56KB12.75KB▼ 65.11%