Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.20MB] [CPU: ▼7.52ms] Passed 4 tests
A check of server-side resources used by IP2Location Hello Greeting
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.10 ▲0.64 | 45.79 ▲2.30 |
Dashboard /wp-admin | 3.44 ▲0.10 | 50.63 ▼16.11 |
Posts /wp-admin/edit.php | 3.55 ▲0.20 | 46.93 ▼3.56 |
Add New Post /wp-admin/post-new.php | 6.25 ▲0.36 | 90.11 ▼12.71 |
Media Library /wp-admin/upload.php | 3.36 ▲0.14 | 39.36 ▲2.99 |
IP2Location Hello Greeting /wp-admin/options-general.php?page=ip2location-hello-greeting | 3.84 | 36.19 |
Server storage [IO: ▲3.74MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 10 new options
New WordPress options |
---|
can_compress_scripts |
ip2location_hello_greeting_debug_log_enabled |
widget_ip2locationhellogreeting |
widget_recent-comments |
widget_recent-posts |
ip2location_hello_greeting_database |
theysaidso_admin_options |
widget_theysaidso_widget |
ip2location_hello_greeting_lookup_mode |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for IP2Location Hello Greeting
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.25 ▼0.17 | 1.88 ▲0.22 | 44.59 ▲0.92 |
Dashboard /wp-admin | 2,199 ▲25 | 5.57 ▲0.00 | 88.39 ▼1.76 | 43.39 ▼3.35 |
Posts /wp-admin/edit.php | 2,104 ▲7 | 2.02 ▼0.04 | 34.40 ▼2.39 | 43.18 ▲8.21 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.14 ▼0.06 | 671.00 ▼6.60 | 68.79 ▲12.45 |
Media Library /wp-admin/upload.php | 1,398 ▼2 | 4.21 ▲0.01 | 109.01 ▲9.76 | 47.17 ▲0.56 |
IP2Location Hello Greeting /wp-admin/options-general.php?page=ip2location-hello-greeting | 918 | 1.99 | 26.91 | 37.62 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- This plugin did not uninstall successfully, leaving 7 options in the database
- db_upgraded
- widget_ip2locationhellogreeting
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- 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
Everything seems fine, however 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
Please take a closer look at the following
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ip2location-hello-greeting/ip2location-hello-greeting.php:16
- > PHP Fatal error
Uncaught Exception: IP2Location\\WebService: OK in wp-content/plugins/ip2location-hello-greeting/vendor/ip2location/ip2location-php/IP2Location.php:2203
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: ip geolocation, targeted content, geolocation, customize message, greeting message
ip2location-hello-greeting/ip2location-hello-greeting.php Passed 13 tests
"IP2Location Hello Greeting" version 1.2.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
99 characters long description:
Displays the Hello greeting message in visitor's native language based on visitor's origin country.
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
These items require your attention
- Do not include executable or dangerous files in your plugin
- .bin - Binary Executable in Windows, macOS, Linux
- ☣ wp-content/plugins/ip2location-hello-greeting/vendor/ip2location/ip2location-php/databases/IP2LOCATION-LITE-DB1.BIN
- ☣ wp-content/plugins/ip2location-hello-greeting/IP2LOCATION-LITE-DB1.BIN
- .bin - Binary Executable in Windows, macOS, Linux
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 421 | 1,138 | 1,879 |
Markdown | 1 | 29 | 0 | 65 |
JavaScript | 1 | 9 | 0 | 60 |
JSON | 1 | 0 | 0 | 44 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 103)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 60.17 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 166.00 |
Average method complexity | 5.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 103.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 86 | |
▷ Static methods | 13 | 15.12% |
▷ Public methods | 53 | 61.63% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 33 | 38.37% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 66.67% |
Constants | 53 | |
▷ Global constants | 2 | 3.77% |
▷ Class constants | 51 | 96.23% |
▷ Public constants | 51 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
25 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
hello_top25/jv.png | 6.41KB | 2.49KB | ▼ 61.20% |
hello_top25/pt.png | 6.58KB | 2.54KB | ▼ 61.48% |
hello_top25/de.png | 6.39KB | 2.45KB | ▼ 61.67% |
hello_top25/pl.png | 7.04KB | 2.60KB | ▼ 63.12% |
hello_top25/it.png | 6.70KB | 2.54KB | ▼ 62.01% |