67% ip2currency-converter

Code Review | IP2CurrencyConverter

WordPress plugin IP2CurrencyConverter scored67%from 54 tests.

About plugin

  • Plugin page: ip2currency-conve...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 17, 2012
  • Latest release: Nov 10, 2023
  • Number of updates: 25
  • Update frequency: every 165.4 days
  • Top authors: ip2location (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,797 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.68MB] [CPU: ▼50.15ms] Passed 4 tests

An overview of server-side resources used by IP2CurrencyConverter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.33 ▼1.149.35 ▼30.50
Dashboard /wp-admin2.34 ▼1.0113.65 ▼47.53
Posts /wp-admin/edit.php2.34 ▼1.0211.01 ▼35.02
Add New Post /wp-admin/post-new.php2.34 ▼3.5512.42 ▼87.53
Media Library /wp-admin/upload.php2.34 ▼0.899.97 ▼21.98

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for IP2CurrencyConverter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲4714.67 ▼0.041.71 ▼0.0043.68 ▼0.05
Dashboard /wp-admin2,199 ▲225.61 ▲0.1090.85 ▼0.4740.62 ▼4.48
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0039.31 ▲1.6333.99 ▼3.95
Add New Post /wp-admin/post-new.php1,529 ▲323.32 ▲0.25657.98 ▼30.8552.01 ▲0.20
Media Library /wp-admin/upload.php1,404 ▲14.13 ▼0.07101.47 ▼0.1241.57 ▼0.71
IP2CurrencyConverter /wp-admin/IP2CurrencyConverter.php260.410.0613.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method IP2CurrencyConverter::register() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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/ip2currency-converter/IP2CurrencyConverter.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/IP2CurrencyConverter.php
    • > Network (severe)
    wp-admin/IP2CurrencyConverter.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Vertical widget) image not found
  • Plugin Name: Please specify the plugin name on the first line ( === ip2currency-converter === )
Please take inspiration from this readme.txt

ip2currency-converter/IP2CurrencyConverter.php 85% from 13 tests

Analyzing the main PHP file in "IP2CurrencyConverter" version 1.0.8
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 187 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ip2currency-converter.php" instead of "IP2CurrencyConverter.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
Good job! No executable or dangerous file extensions detected394 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14511334
JavaScript19060

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin