84% novasense-security

Code Review | NovaSense

WordPress plugin NovaSense scored84%from 54 tests.

About plugin

  • Plugin page: novasense-security
  • Plugin version: 1.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.5
  • WordPress version: 6.3.1
  • First release: Aug 14, 2020
  • Latest release: Aug 15, 2020
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: snaptofficial (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.89ms] Passed 4 tests

An overview of server-side resources used by NovaSense
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.53 ▼2.88
Dashboard /wp-admin3.34 ▲0.0450.39 ▲1.67
Posts /wp-admin/edit.php3.39 ▲0.0447.20 ▼0.94
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.03 ▼15.80
Media Library /wp-admin/upload.php3.26 ▲0.0334.15 ▲0.08
NovaSense /wp-admin/options-general.php?page=novasense3.2331.05

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
abl_nstis_version
widget_recent-comments

Browser metrics Passed 4 tests

NovaSense: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▼0.001.72 ▲0.0746.53 ▲6.67
Dashboard /wp-admin2,196 ▲165.54 ▼0.0690.59 ▲4.3241.26 ▼2.47
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0335.14 ▲0.1130.86 ▼11.40
Add New Post /wp-admin/post-new.php1,538 ▲1218.42 ▼4.76605.44 ▲2.1360.67 ▲14.24
Media Library /wp-admin/upload.php1,398 ▼24.16 ▼0.0893.35 ▼3.6642.39 ▼1.35
NovaSense /wp-admin/options-general.php?page=novasense8192.0027.5328.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: code in wp-content/plugins/novasense-security/public/error.php on line 73
    • > PHP Warning
      Use of undefined constant NSTIS_BOTNET - assumed 'NSTIS_BOTNET' (this will throw an Error in a future version of PHP) in wp-content/plugins/novasense-security/public/error.php on line 81
    • > PHP Warning
      Use of undefined constant NSTIS_ABUSER - assumed 'NSTIS_ABUSER' (this will throw an Error in a future version of PHP) in wp-content/plugins/novasense-security/public/error.php on line 73
    • > PHP Notice
      Undefined variable: ip in wp-content/plugins/novasense-security/public/error.php on line 65
    • > PHP Notice
      Undefined variable: code in wp-content/plugins/novasense-security/public/error.php on line 69
    • > PHP Warning
      Use of undefined constant NSTIS_THREAT - assumed 'NSTIS_THREAT' (this will throw an Error in a future version of PHP) in wp-content/plugins/novasense-security/public/error.php on line 69
    • > PHP Warning
      Use of undefined constant NSTIS_MALWARE - assumed 'NSTIS_MALWARE' (this will throw an Error in a future version of PHP) in wp-content/plugins/novasense-security/public/error.php on line 77
    • > PHP Notice
      Undefined variable: code in wp-content/plugins/novasense-security/public/error.php on line 81
    • > PHP Notice
      Undefined variable: code in wp-content/plugins/novasense-security/public/error.php on line 77

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: firewall, security, novasense

novasense-security/novasense.php 85% from 13 tests

"NovaSense" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("novasense-security.php" instead of "novasense.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected271 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP971130271

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants444.44%
▷ Class constants555.56%
▷ Public constants5100.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
There were not PNG files found in your plugin