79% nps-computy

Code Review | NPS computy

WordPress plugin NPS computy scored 79% from 54 tests.

About plugin

  • Plugin page: nps-computy
  • Plugin version: 2.7.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Aug 13, 2018
  • Latest release: Aug 18, 2023
  • Number of updates: 48
  • Update frequency: every 38.2 days
  • Top authors: calliko (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

90+ active / 3,213 total downloads

Benchmarks

Plugin footprint 65% 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.15MB] [CPU: ▼4.79ms] Passed 4 tests

Analyzing server-side resources used by NPS computy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.59 ▼3.67
Dashboard /wp-admin3.48 ▲0.1847.79 ▲1.96
Posts /wp-admin/edit.php3.59 ▲0.2450.31 ▼0.16
Add New Post /wp-admin/post-new.php6.08 ▲0.1984.43 ▼17.27
Media Library /wp-admin/upload.php3.40 ▲0.1738.43 ▲5.58
NPS Monitoring /wp-admin/options-general.php?page=nps-plugin-options3.3733.67

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 79 new files
Database: 1 new table, 7 new options
New tables
wp_nps_computy
New WordPress options
can_compress_scripts
theysaidso_admin_options
npsc_db_version
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for NPS computy
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲18413.86 ▼0.516.25 ▲4.0544.77 ▲1.17
Dashboard /wp-admin2,214 ▲235.13 ▼0.7698.26 ▼2.4840.13 ▼4.54
Posts /wp-admin/edit.php2,100 ▲82.48 ▲0.4638.35 ▼2.3135.88 ▲0.36
Add New Post /wp-admin/post-new.php1,528 ▼823.41 ▲0.21670.02 ▲83.9456.64 ▲3.85
Media Library /wp-admin/upload.php1,399 ▲84.48 ▲0.3897.72 ▲0.7940.37 ▼6.94
NPS Monitoring /wp-admin/options-general.php?page=nps-plugin-options1,1131.8425.6030.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_nps_computy
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: score, promoter, statistic, nps, net...

nps-computy/index.php 85% from 13 tests

This is the main PHP file of "NPS computy" version 2.7.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 169 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nps-computy.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected22,810 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript373,3769,07615,292
CSS258011176,558
PHP218844821
PO File14749119
SVG20120

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity81.00
▷ Minimum class complexity81.00
▷ Maximum class complexity81.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods2392.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_inc/datatables/DataTables-1.10.21/images/sort_asc.png0.16KB0.25KB0.00%
img/speed.png13.07KB13.60KB0.00%
_inc/datatables/DataTables-1.10.21/images/sort_desc_disabled.png0.14KB0.25KB0.00%
_inc/datatables/DataTables-1.10.21/images/sort_asc_disabled.png0.14KB0.25KB0.00%
_inc/datatables/DataTables-1.10.21/images/sort_both.png0.20KB0.29KB0.00%