10% ip-blocker-wp

Code Review | IP Blocker WP par JM Créa

WordPress plugin IP Blocker WP par JM Créa scored 10% from 54 tests.

About plugin

  • Plugin page: ip-blocker-wp
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 18, 2016
  • Latest release: Jun 18, 2016
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: Dge-06 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 887 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/ip-blocker-wp/includes/install.php+49
    Use of undefined constant admin_email - assumed 'admin_email' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.15MB] [CPU: ▼18.90ms] Passed 4 tests

A check of server-side resources used by IP Blocker WP par JM Créa
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0224.29 ▼20.17
Dashboard /wp-admin3.18 ▼0.1330.21 ▼19.74
Posts /wp-admin/edit.php3.31 ▼0.0535.69 ▼14.61
Add New Post /wp-admin/post-new.php5.50 ▼0.3976.00 ▼21.09
Media Library /wp-admin/upload.php3.24 ▲0.0130.57 ▼6.69

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: 2 new tables, 6 new options
New tables
wp_ipb
wp_ipb_p
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for IP Blocker WP par JM Créa
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲4814.55 ▲0.121.68 ▼0.4138.23 ▼2.19
Dashboard /wp-admin2,211 ▲264.93 ▼0.89114.37 ▲14.4765.22 ▲19.83
Posts /wp-admin/edit.php2,112 ▲231.98 ▼0.0337.72 ▲1.3033.49 ▲0.20
Add New Post /wp-admin/post-new.php1,543 ▲922.97 ▼0.21719.84 ▲110.4351.20 ▼17.11
Media Library /wp-admin/upload.php1,399 ▲114.14 ▼0.0698.72 ▼3.1570.46 ▲24.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 does not fully uninstall, leaving 2 tables in the database
    • wp_ipb_p
    • wp_ipb
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ip-blocker-wp/index.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ip-blocker-wp/includes/install.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === ip-blocker-wp === )
  • Tags: Too many tags (29 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: The plugin version is formatted incorrectly
  • Screenshots: No descriptions were found for these screenshots #0, #0 in ip-blocker-wp/assets to your readme.txt
You can look at the official readme.txt

ip-blocker-wp/index.php 92% from 13 tests

This is the main PHP file of "IP Blocker WP par JM Créa" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ip-blocker-wp.php" instead of "index.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 plugin390 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23921359
CSS15131

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions9
▷ Named functions9100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/picto_agenda.png0.48KB0.71KB0.00%
ip-blocker-wp.png0.67KB0.53KB▼ 20.82%