Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▼0.11MB] [CPU: ▼18.79ms] Passed 4 tests
Analyzing server-side resources used by Limit Login Countries
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▼0.01 | 40.53 ▼19.58 |
Dashboard /wp-admin | 3.33 ▲0.02 | 53.17 ▼9.80 |
Posts /wp-admin/edit.php | 3.38 ▼0.47 | 49.95 ▼10.04 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 90.73 ▼35.73 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 36.73 ▼6.55 |
Login Countries /wp-admin/options-general.php?page=limit-login-countries | 4.53 | 37.24 |
Server storage [IO: ▲0.64MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Limit Login Countries
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.28 ▼0.72 | 3.94 ▲1.56 | 42.75 ▼6.89 |
Dashboard /wp-admin | 2,210 ▲28 | 5.85 ▼0.05 | 102.36 ▼14.91 | 39.32 ▼8.59 |
Posts /wp-admin/edit.php | 2,096 ▲4 | 1.99 ▼0.00 | 37.52 ▼0.55 | 36.24 ▲1.20 |
Add New Post /wp-admin/post-new.php | 1,536 ▲15 | 23.24 ▲0.32 | 672.81 ▲10.08 | 49.17 ▼9.38 |
Media Library /wp-admin/upload.php | 1,395 ▲10 | 4.16 ▼0.03 | 99.56 ▼27.81 | 45.67 ▼11.36 |
Login Countries /wp-admin/options-general.php?page=limit-login-countries | 951 | 2.45 | 32.16 | 69.27 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
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)
The smoke test was a success, however most plugin functionality was not tested
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
Please fix the following
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/limit-login-countries/limit-login-countries.php:47
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: login, security
limit-login-countries/limit-login-countries.php Passed 13 tests
"Limit Login Countries" version 0.6.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
126 characters long description:
This plugin gives you the ability to limit WordPress admin logins based on the country the visitor's IP address is located in.
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 detected13,239 lines of code in 30 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 120 | 245 | 10,255 |
JavaScript | 11 | 480 | 2,930 | 1,543 |
PO File | 1 | 287 | 798 | 642 |
Pascal | 2 | 62 | 1,690 | 380 |
Markdown | 1 | 60 | 0 | 249 |
CSS | 8 | 1 | 7 | 170 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 7.60 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 14.00 |
Average method complexity | 2.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 30 | |
▷ Static methods | 20 | 66.67% |
▷ Public methods | 25 | 83.33% |
▷ Protected methods | 3 | 10.00% |
▷ Private methods | 2 | 6.67% |
Functions | 3 | |
▷ Named functions | 2 | 66.67% |
▷ Anonymous functions | 1 | 33.33% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/TextExt/css/close.png | 0.40KB | 0.23KB | ▼ 41.38% |
vendor/TextExt/css/arrow.png | 0.17KB | 0.10KB | ▼ 42.94% |