84% ip-tools

Code Review | IP Tools

WordPress plugin IP Tools scored84%from 54 tests.

About plugin

  • Plugin page: ip-tools
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2013
  • Latest release: Feb 22, 2019
  • Number of updates: 13
  • Update frequency: every 157.4 days
  • Top authors: ChrisDennis (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /3,000 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by IP Tools
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.52 ▼0.66
Dashboard /wp-admin3.31 ▼0.0347.84 ▼12.43
Posts /wp-admin/edit.php3.36 ▲0.0150.47 ▲4.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.62 ▼16.48
Media Library /wp-admin/upload.php3.24 ▲0.0138.01 ▲0.59

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_ipt_address_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for IP Tools
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.79 ▲0.422.20 ▲0.6141.07 ▼5.06
Dashboard /wp-admin2,206 ▲185.04 ▲0.13100.45 ▼12.4738.95 ▼5.68
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0340.55 ▼2.4134.42 ▼2.17
Add New Post /wp-admin/post-new.php1,538 ▲1023.09 ▲4.78688.37 ▲68.6557.15 ▲2.43
Media Library /wp-admin/upload.php1,385 ▲34.21 ▲0.0395.19 ▼8.7244.32 ▲2.91

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_ipt_address_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ip-tools/iptools.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === ip-tools === )
Please take inspiration from this readme.txt

ip-tools/iptools.php 92% from 13 tests

The entry point to "IP Tools" version 0.1.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ip-tools.php" instead of "iptools.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin138 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1203675
SVG11161
CSS2022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin