90% notifier-and-ip-blocker

Code Review | Notifier and IP Blocker

WordPress plugin Notifier and IP Blocker scored90%from 54 tests.

About plugin

  • Plugin page: notifier-and-ip-b...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4
  • WordPress version: 6.3.1
  • First release: Dec 8, 2015
  • Latest release: Dec 9, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: MLWebDevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.69ms] Passed 4 tests

An overview of server-side resources used by Notifier and IP Blocker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.82 ▲4.81
Dashboard /wp-admin3.43 ▲0.1244.96 ▲0.10
Posts /wp-admin/edit.php3.54 ▲0.1947.18 ▲0.80
Add New Post /wp-admin/post-new.php6.01 ▲0.1280.63 ▼7.15
Media Library /wp-admin/upload.php3.35 ▲0.1235.68 ▲3.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: 2 new tables, 37 new options
New tables
wp_naipb_blocked_list
wp_naipb_spam_list
New WordPress options
notifier_and_ip_blocker_blocked_ip_page_content
notifier_and_ip_blocker_15
widget_recent-comments
widget_theysaidso_widget
notifier_and_ip_blocker_7
notifier_and_ip_blocker
notifier_and_ip_blocker_3
notifier_and_ip_blocker_enable_grecaptca
notifier_and_ip_blocker_2
notifier_and_ip_blocker_blocked_ip_page_noindex
...

Browser metrics Passed 4 tests

An overview of browser requirements for Notifier and IP Blocker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.45 ▲0.101.79 ▲0.1643.07 ▼0.64
Dashboard /wp-admin2,210 ▲305.65 ▲0.0183.37 ▼5.6659.85 ▲17.96
Posts /wp-admin/edit.php2,115 ▲181.98 ▼0.0435.40 ▲1.5331.56 ▼6.76
Add New Post /wp-admin/post-new.php1,692 ▲16622.06 ▼0.97766.44 ▲46.5050.05 ▼8.62
Media Library /wp-admin/upload.php1,409 ▲94.12 ▼0.1396.08 ▼8.6972.24 ▲25.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 36 options in the database
    • notifier_and_ip_blocker_4
    • notifier_and_ip_blocker_1
    • notifier_and_ip_blocker_blocked_ip_page_noindex
    • notifier_and_ip_blocker_enabled_cf7
    • notifier_and_ip_blocker_blocked_ip_login_page_exclude
    • widget_theysaidso_widget
    • notifier_and_ip_blocker_11
    • notifier_and_ip_blocker_db_truncate
    • notifier_and_ip_blocker_subject
    • notifier_and_ip_blocker_12
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (24 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

notifier-and-ip-blocker/notifier-and-ip-blocker.php Passed 13 tests

The main PHP script in "Notifier and IP Blocker" version 1.0 is automatically included on every request by WordPress
123 characters long description:
Notify a user about when he sent comment or form via Contact Form 7 and automatically blocked spammer IP by notifier users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected904 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8187407868
JavaScript22236
CSS1010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity28.25
▷ Minimum class complexity8.00
▷ Maximum class complexity80.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods3076.92%
▷ Protected methods00.00%
▷ Private methods923.08%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.72KB0.19KB▼ 73.71%