84% real-ip-detector

Code Review | Real IP Detector

WordPress plugin Real IP Detector scored84%from 54 tests.

About plugin

  • Plugin page: real-ip-detector
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 4, 2015
  • Latest release: Mar 18, 2023
  • Number of updates: 7
  • Update frequency: every 393.2 days
  • Top authors: central.hosting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,743 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼3.30ms] Passed 4 tests

A check of server-side resources used by Real IP Detector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.57 ▼3.87
Dashboard /wp-admin3.31 ▼0.0353.76 ▼11.25
Posts /wp-admin/edit.php3.37 ▲0.0152.84 ▲1.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.61 ▲0.68
Media Library /wp-admin/upload.php3.24 ▲0.0137.62 ▲1.49

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Real IP Detector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.24 ▼0.132.01 ▲0.1743.20 ▼0.83
Dashboard /wp-admin2,211 ▲405.55 ▼0.0885.64 ▼12.4940.25 ▼3.45
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0540.69 ▼0.8638.77 ▲3.58
Add New Post /wp-admin/post-new.php1,541 ▲1523.31 ▼0.42681.40 ▲61.1652.87 ▲1.44
Media Library /wp-admin/upload.php1,407 ▲44.20 ▼0.0699.13 ▲0.1943.26 ▲0.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/real-ip-detector/real-ip.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: ip, comments

real-ip-detector/real-ip.php 85% from 13 tests

Analyzing the main PHP file in "Real IP Detector" version 1.4
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("real-ip-detector.php" instead of "real-ip.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 171 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected76 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP123876

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.68
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon.png1.28KB0.65KB▼ 49.27%
banner-772x250.png140.08KB74.35KB▼ 46.92%