93% wp-spam-ip

Code Review | WP Spam IP

WordPress plugin WP Spam IP scored 93% from 54 tests.

About plugin

  • Plugin page: wp-spam-ip
  • Plugin version: 1.0.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 5.8.1
  • First release: Nov 3, 2014
  • Latest release: Nov 5, 2014
  • Number of updates: 16
  • Update frequency: every 2.7 days
  • Top authors: WebKreativ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 810 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼141.81ms] Passed 4 tests

This is a short check of server-side resources used by WP Spam IP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1636.74 ▲18.82
Dashboard /wp-admin3.10 ▲0.0547.20 ▲0.60
Posts /wp-admin/edit.php3.15 ▲0.0546.13 ▲0.24
Add New Post /wp-admin/post-new.php5.46 ▲0.0392.02 ▼559.95
Media Library /wp-admin/upload.php3.05 ▲0.0429.98 ▼8.11

Server storage [IO: ▲0.01MB] [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, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Spam IP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.90 ▲0.2910.61 ▲0.7049.42 ▼0.48
Dashboard /wp-admin2,989 ▲526.17 ▲0.13132.82 ▼10.80114.18 ▲0.51
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0062.30 ▼3.8589.05 ▼6.39
Add New Post /wp-admin/post-new.php1,615 ▼5521.73 ▲2.56277.98 ▼100.88105.42 ▼7.97
Media Library /wp-admin/upload.php1,810 ▲35.04 ▼0.01140.74 ▼8.05119.49 ▲3.96

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/wp-spam-ip/index.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Screenshot #1 (Coming Soon) image not found
The official readme.txt might help

wp-spam-ip/index.php 85% from 13 tests

The entry point to "WP Spam IP" version 1.0.0.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-spam-ip.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)

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 plugin480 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11527480

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin