84% whitelist-ip-for-limit-login-attempts

Code Review | Whitelist IP For Limit Login Attempts

WordPress plugin Whitelist IP For Limit Login Attempts scored84%from 54 tests.

About plugin

  • Plugin page: whitelist-ip-for-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4
  • WordPress version: 6.3.1
  • First release: Jul 12, 2013
  • Latest release: Jan 26, 2016
  • Number of updates: 7
  • Update frequency: every 132.6 days
  • Top authors: lordspace (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /19,719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.55ms] Passed 4 tests

This is a short check of server-side resources used by Whitelist IP For Limit Login Attempts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0543.06 ▲0.12
Dashboard /wp-admin3.36 ▲0.0251.51 ▼14.12
Posts /wp-admin/edit.php3.41 ▲0.0648.68 ▼0.05
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.50 ▼16.07
Media Library /wp-admin/upload.php3.29 ▲0.0636.91 ▲0.06
Whitelist IP For Limit Login Attempts /wp-admin/options-general.php?page=whitelist-ip-for-limit-login-attempts/whitelist-ip-for-limit-login-attempts.php3.2539.91

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Whitelist IP For Limit Login Attempts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3713.55 ▼0.691.90 ▼0.2741.89 ▼2.17
Dashboard /wp-admin2,227 ▲244.84 ▼0.04101.97 ▼6.2840.40 ▼0.58
Posts /wp-admin/edit.php2,106 ▲62.04 ▲0.0136.02 ▲0.6933.49 ▼1.79
Add New Post /wp-admin/post-new.php1,545 ▼122.95 ▼0.28679.50 ▲66.5063.48 ▲9.48
Media Library /wp-admin/upload.php1,409 ▲124.17 ▼0.0299.08 ▼4.8445.45 ▲0.48
Whitelist IP For Limit Login Attempts /wp-admin/options-general.php?page=whitelist-ip-for-limit-login-attempts/whitelist-ip-for-limit-login-attempts.php1,3133.9383.8339.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whitelist-ip-for-limit-login-attempts/whitelist-ip-for-limit-login-attempts.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Screenshots: Please add images for these screenshots: #1 (Plugin page after installation), #2 (Settings page for Whitelist IP For Limit Login Attempts)
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

whitelist-ip-for-limit-login-attempts/whitelist-ip-for-limit-login-attempts.php Passed 13 tests

This is the main PHP file of "Whitelist IP For Limit Login Attempts" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
95 characters long description:
This plugin allows you whitelist IP addresses so Limit Login Attempt plugin doesn't block them.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected428 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19072352
CSS116376

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity4.50
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity4.50
▷ Minimum method complexity3.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods2
▷ Static methods150.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.11MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png47.50KB27.40KB▼ 42.31%
screenshot-2.png64.64KB31.80KB▼ 50.81%
i/guNzr.qr.2.png0.23KB0.23KB0.43%
i/guNzr.qr.16.png0.39KB0.41KB0.00%