Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.40MB] [CPU: ▼9.11ms] Passed 4 tests
An overview of server-side resources used by IP2Location World Clock
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.88 ▲0.41 | 39.61 ▼2.17 |
Dashboard /wp-admin | 3.72 ▲0.37 | 46.83 ▼16.69 |
Posts /wp-admin/edit.php | 3.83 ▲0.47 | 51.60 ▲1.28 |
Add New Post /wp-admin/post-new.php | 6.30 ▲0.40 | 83.61 ▼18.84 |
Media Library /wp-admin/upload.php | 3.64 ▲0.40 | 38.42 ▲5.89 |
Server storage [IO: ▲2.93MB] [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: 152 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_iwc |
theysaidso_admin_options |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for IP2Location World Clock
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,802 ▲30 | 14.27 ▼0.12 | 1.57 ▼0.44 | 39.33 ▼3.06 |
Dashboard /wp-admin | 2,210 ▲36 | 5.64 ▼0.03 | 92.64 ▼8.30 | 40.29 ▼2.18 |
Posts /wp-admin/edit.php | 2,115 ▲12 | 1.97 ▼0.04 | 39.87 ▲0.99 | 35.23 ▼1.12 |
Add New Post /wp-admin/post-new.php | 1,536 ▲10 | 23.22 ▼0.30 | 673.07 ▼24.21 | 55.37 ▼5.40 |
Media Library /wp-admin/upload.php | 1,409 ▲6 | 4.21 ▲0.02 | 102.81 ▲4.49 | 48.16 ▲5.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- db_upgraded
- widget_iwc
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
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
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ip2location-world-clock/ip2location-world-clock-menu.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/ip2location-world-clock/ip2location-world-clock.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: local time, world clock, analog clock, clock, digital clock...
ip2location-world-clock/ip2location-world-clock.php Passed 13 tests
The main file in "IP2Location World Clock" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
68 characters long description:
Display analog or digital clock on your site based on time selection
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin8,357 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 809 | 876 | 6,209 |
CSS | 1 | 194 | 17 | 1,609 |
JavaScript | 2 | 83 | 14 | 539 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 376)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 1.02 |
Average class complexity | 283.00 |
▷ Minimum class complexity | 185.00 |
▷ Maximum class complexity | 381.00 |
Average method complexity | 13.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 376.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 47 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 15 | 31.91% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 32 | 68.09% |
Functions | 17 | |
▷ Named functions | 15 | 88.24% |
▷ Anonymous functions | 2 | 11.76% |
Constants | 57 | |
▷ Global constants | 3 | 5.26% |
▷ Class constants | 54 | 94.74% |
▷ Public constants | 54 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
133 PNG files occupy 1.84MB with 0.89MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/bg/clock_bg22.png | 51.86KB | 21.31KB | ▼ 58.90% |
assets/images/bg/clock_bg20.png | 43.09KB | 17.86KB | ▼ 58.55% |
assets/images/example/clock18.png | 31.60KB | 16.42KB | ▼ 48.04% |
assets/images/hand/min22.png | 0.27KB | 0.20KB | ▼ 26.62% |
assets/images/example/clock10.png | 6.24KB | 3.14KB | ▼ 49.72% |