78% ip-statistic

Code Review | alx ip statistic

WordPress plugin alx ip statistic scored78%from 54 tests.

About plugin

  • Plugin page: ip-statistic
  • Plugin version: 2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.3
  • WordPress version: 6.3.1
  • First release: Dec 18, 2018
  • Latest release: Apr 25, 2022
  • Number of updates: 95
  • Update frequency: every 12.9 days
  • Top authors: alex27648 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,494 total downloads

Benchmarks

Plugin footprint 83% 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.12MB] [CPU: ▼5.12ms] Passed 4 tests

A check of server-side resources used by alx ip statistic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.00 ▼1.08
Dashboard /wp-admin3.42 ▲0.1247.50 ▼0.72
Posts /wp-admin/edit.php3.47 ▲0.1243.48 ▼4.74
Add New Post /wp-admin/post-new.php6.00 ▲0.1279.63 ▼13.93
Media Library /wp-admin/upload.php3.35 ▲0.1234.09 ▼0.10
Statistic /wp-admin/admin.php?page=ip-statistic/ip-statics.php3.3134.91
Settings /wp-admin/admin.php?page=ip-statistic-settings3.3134.57

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_ip_stati
New WordPress options
widget_recent-posts
ip_statistic_ver
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for alx ip statistic
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18013.33 ▼1.041.66 ▼0.0541.03 ▼1.50
Dashboard /wp-admin2,332 ▲1475.88 ▲0.05106.13 ▲0.9837.29 ▼6.36
Posts /wp-admin/edit.php2,215 ▲1262.07 ▲0.0534.87 ▼2.3536.15 ▲0.16
Add New Post /wp-admin/post-new.php1,538 ▲1017.44 ▼0.74659.45 ▲25.0953.45 ▼1.74
Media Library /wp-admin/upload.php1,512 ▲1304.23 ▲0.0398.63 ▼1.5742.27 ▼2.83
Statistic /wp-admin/admin.php?page=ip-statistic/ip-statics.php1,1172.0728.2840.76
Settings /wp-admin/admin.php?page=ip-statistic-settings1,0312.0325.2749.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ip-statistic/opt.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ip-statistic/ip-statics.php:25

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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: security, inthome, passwords, pass, ip...

ip-statistic/ip-statics.php 85% from 13 tests

"alx ip statistic" version 2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ip-statistic.php" instead of "ip-statics.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)

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
Everything looks great! No dangerous files found in this plugin844 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP312330563
CSS2330281

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/eth.png6.64KB2.97KB▼ 55.27%
includes/images/btc.png6.07KB2.54KB▼ 58.15%