10% infosniper

Code Review | infoSNIPER

WordPress plugin infoSNIPER scored10%from 54 tests.

About plugin

  • Plugin page: infosniper
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Aug 12, 2019
  • Latest release: Aug 7, 2020
  • Number of updates: 15
  • Update frequency: every 24.1 days
  • Top authors: connecticallc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,138 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/infosniper/public/class-infosniper-public.php+814
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Server metrics [RAM: ▼1.18MB] [CPU: ▼40.30ms] Passed 4 tests

Analyzing server-side resources used by infoSNIPER
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6818.34 ▼20.96
Dashboard /wp-admin2.84 ▼0.4720.96 ▼30.25
Posts /wp-admin/edit.php2.84 ▼0.5215.85 ▼30.89
Add New Post /wp-admin/post-new.php2.84 ▼3.0520.14 ▼79.10
Media Library /wp-admin/upload.php2.84 ▼0.3922.55 ▼13.11

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: 1 new table, 7 new options
New tables
wp_infoSniperAddresses
New WordPress options
widget_recent-comments
can_compress_scripts
infosniper_db_v1_0_1
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by infoSNIPER
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5513.74 ▼0.8218.76 ▲16.9142.81 ▲1.48
Dashboard /wp-admin2,212 ▲355.62 ▼0.0594.95 ▲7.0741.05 ▼3.27
Posts /wp-admin/edit.php2,117 ▲172.02 ▲0.0338.23 ▲0.2834.65 ▼3.14
Add New Post /wp-admin/post-new.php1,541 ▲523.08 ▲4.73639.74 ▼12.1156.28 ▼13.06
Media Library /wp-admin/upload.php1,417 ▲144.21 ▲0.0396.78 ▼12.2447.35 ▲2.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/infosniper/public/class-infosniper-public.php+269
    Trying to access array offset on value of type bool
  • Zombie tables detected upon uninstall: 1 table
    • wp_infoSniperAddresses
  • Zombie WordPress options were found after uninstall: 7 options
    • infosniper_db_v1_0_1
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/infosniper/public/partials/infosniper-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/infosniper/admin/partials/infosniper-admin-display.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: tracking, geolocation

infosniper/infosniper.php Passed 13 tests

The main PHP file in "infoSNIPER" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
83 characters long description:
Track incoming IP Addresses and display information about them using infoSNIPER.net

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin16,218 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,882
CSS101,576534,069
PHP123151,1062,115
JavaScript61234491,152

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity17.43
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods70
▷ Static methods22.86%
▷ Public methods6592.86%
▷ Protected methods00.00%
▷ Private methods57.14%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
36 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/infosniper-icon-white.png2.65KB1.86KB▼ 29.90%
admin/css/images/sort_asc_disabled.png0.14KB0.25KB0.00%
public/css/images/marker-icon.png1.43KB1.55KB0.00%
public/css/images/layers-2x.png1.23KB1.67KB0.00%
admin/css/images/mac-logo.png3.62KB2.02KB▼ 44.31%