74% ip-address-widget-ii

Code Review | IP Address Widget II

WordPress plugin IP Address Widget II scored74%from 54 tests.

About plugin

  • Plugin page: ip-address-widget-ii
  • Plugin version: 1.0.5
  • PHP compatiblity: 4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.6
  • WordPress version: 6.3.1
  • First release: Nov 22, 2012
  • Latest release: Nov 11, 2020
  • Number of updates: 32
  • Update frequency: every 91.0 days
  • Top authors: myproxy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /14,497 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
Install script ran successfully

Server metrics [RAM: ▼1.23MB] [CPU: ▼43.42ms] Passed 4 tests

A check of server-side resources used by IP Address Widget II
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7113.83 ▼26.71
Dashboard /wp-admin2.79 ▼0.5522.59 ▼38.17
Posts /wp-admin/edit.php2.79 ▼0.5619.39 ▼26.70
Add New Post /wp-admin/post-new.php2.79 ▼3.0914.85 ▼82.10
Media Library /wp-admin/upload.php2.79 ▼0.4413.69 ▼20.30

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by IP Address Widget II
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.041.69 ▼0.2345.16 ▲2.36
Dashboard /wp-admin2,206 ▲155.86 ▼0.04112.97 ▲11.0539.23 ▲2.05
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0239.82 ▲4.3235.07 ▼4.42
Add New Post /wp-admin/post-new.php1,538 ▲1923.35 ▲0.20652.12 ▲0.9059.98 ▲2.46
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0396.50 ▼7.0642.92 ▼2.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ip-address-widget-ii/ip-address-widget.php:138

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

ip-address-widget-ii/ip-address-widget.php 92% from 13 tests

"IP Address Widget II" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ip-address-widget-ii.php" instead of "ip-address-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin120 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1118120

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin