72% threatpoint-api

Code Review | ThreatPoint IP Reputation

WordPress plugin ThreatPoint IP Reputation scored 72% from 54 tests.

About plugin

  • Plugin page: threatpoint-api
  • Plugin version: 2.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-5.8.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2020
  • Latest release: Nov 26, 2021
  • Number of updates: 71
  • Update frequency: every 8.9 days
  • Top authors: threatpointuk (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,083 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by ThreatPoint IP Reputation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0726.27 ▼13.40
Dashboard /wp-admin3.32 ▲0.0249.53 ▲3.35
Posts /wp-admin/edit.php3.37 ▲0.0245.99 ▼2.57
Add New Post /wp-admin/post-new.php5.90 ▲0.02106.34 ▲9.11
Media Library /wp-admin/upload.php3.24 ▲0.0236.50 ▲1.98
ThreatPoint IP Rep /wp-admin/options-general.php?page=ThreatPoint-api-page3.1928.68

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ThreatPoint IP Reputation
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.67 ▼0.761.72 ▼0.0943.50 ▼0.67
Dashboard /wp-admin2,213 ▲285.86 ▲0.04103.18 ▼2.6045.80 ▲0.62
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0537.33 ▼2.3932.37 ▼4.70
Add New Post /wp-admin/post-new.php1,545 ▲1118.63 ▼4.46612.89 ▼50.7456.76 ▼2.18
Media Library /wp-admin/upload.php1,386 ▲14.19 ▼0.0796.78 ▼5.3940.83 ▼3.47
ThreatPoint IP Rep /wp-admin/options-general.php?page=ThreatPoint-api-page1,05618.35539.9981.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ThreatPoint-api-page
    • > Notice in wp-content/plugins/threatpoint-api/Threatpoint-api.php+276
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/threatpoint-api/Threatpoint-api.php

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/options-general.php?page=ThreatPoint-api-page
    • > Security (warning) in unknown
    https://public.flourish.studio/resources/embed.js 16 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.

Optimizations

Plugin configuration 90% 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 to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

threatpoint-api/Threatpoint-api.php 85% from 13 tests

The primary PHP file in "ThreatPoint IP Reputation" version 2.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("threatpoint-api.php" instead of "Threatpoint-api.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 266 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected673 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP114118673

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions23
▷ Named functions23100.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 files were detected