Benchmarks
Plugin footprint 82% 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.22MB] [CPU: ▲2,178.07ms] 75% from 4 tests
A check of server-side resources used by Restrict Country Access
It is recommended to improve the following
- Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 2,178.07ms on /wp-admin/upload.php)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 50.23 ▲46.72 | 9,690,535.98 ▲9,690,491.65 |
Dashboard /wp-admin | 50.48 ▲0.26 | 9,691,113.71 ▲8,719.59 |
Posts /wp-admin/edit.php | 3.65 ▲0.24 | 52.91 ▲0.49 |
Add New Post /wp-admin/post-new.php | 6.14 ▲0.21 | 89.23 ▼12.15 |
Media Library /wp-admin/upload.php | 3.46 ▲0.18 | 40.31 ▲4.34 |
Server storage [IO: ▲1.35MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Restrict Country Access
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,799 ▲28 | 14.39 ▼0.34 | 1.61 ▼0.64 | 39.98 ▼6.67 |
Dashboard /wp-admin | 2,215 ▲38 | 5.86 ▲0.19 | 91.10 ▲0.52 | 40.74 ▼5.42 |
Posts /wp-admin/edit.php | 2,117 ▲14 | 2.29 ▲0.32 | 33.99 ▼1.67 | 29.36 ▼3.09 |
Add New Post /wp-admin/post-new.php | 7,291 ▲5,765 | 26.44 ▲3.42 | 979.10 ▲282.81 | 61.89 ▲7.28 |
Media Library /wp-admin/upload.php | 1,423 ▲26 | 4.34 ▲0.14 | 109.16 ▲1.99 | 47.00 ▼0.16 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
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
Almost there! Just fix the following items
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/restrict-country-access/restrict-country.php:30
- > 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, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Option to set Country which you want to restrict screenshot-1.png.), #2 (Selected Country will be Restricted screenshot-2.png.)
restrict-country-access/restrict-country.php 85% from 13 tests
Analyzing the main PHP file in "Restrict Country Access" version 1.1.0
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("restrict-country-access.php" instead of "restrict-country.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin31,260 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 3 | 0 | 0 | 29,820 |
PHP | 5 | 74 | 126 | 1,318 |
JavaScript | 6 | 15 | 49 | 87 |
Markdown | 1 | 9 | 0 | 33 |
CSS | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.46 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 24.78KB | 9.63KB | ▼ 61.14% |
screenshot-2.png | 13.58KB | 4.87KB | ▼ 64.16% |