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.22MB] [CPU: ▲3.24ms] Passed 4 tests
Server-side resources used by MKD Air Quality
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.68 ▲0.22 | 46.15 ▲5.97 |
Dashboard /wp-admin | 3.57 ▲0.27 | 56.18 ▲6.37 |
Posts /wp-admin/edit.php | 3.62 ▲0.26 | 50.50 ▲0.35 |
Add New Post /wp-admin/post-new.php | 6.09 ▲0.20 | 96.26 ▲0.45 |
Media Library /wp-admin/upload.php | 3.43 ▲0.20 | 39.96 ▲6.17 |
AIR Quality (MK) /wp-admin/options-general.php?page=mkd-air-quality | 3.40 | 33.97 |
Server storage [IO: ▲2.88MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 7 new options
New WordPress options |
---|
mkdaiq_settings |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for MKD Air Quality
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.22 ▼1.53 | 1.94 ▲0.07 | 44.90 ▼5.37 |
Dashboard /wp-admin | 2,213 ▲25 | 4.89 ▲0.00 | 101.22 ▼8.55 | 41.56 ▼4.87 |
Posts /wp-admin/edit.php | 2,090 ▼2 | 2.00 ▼0.02 | 34.01 ▼7.90 | 32.66 ▼2.96 |
Add New Post /wp-admin/post-new.php | 1,548 ▲34 | 18.12 ▲0.47 | 620.97 ▼54.22 | 59.02 ▲6.33 |
Media Library /wp-admin/upload.php | 1,386 ▼2 | 4.23 ▲0.03 | 96.34 ▼8.79 | 40.19 ▼5.84 |
AIR Quality (MK) /wp-admin/options-general.php?page=mkd-air-quality | 807 | 2.02 | 24.87 | 28.76 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- Zombie WordPress options detected upon uninstall: 7 options
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- mkdaiq_settings
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 50% 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 0% 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
- 3× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wp-mkd-air-quality/admin/partials/mkd-air-quality-admin-display.php
- > /wp-content/plugins/wp-mkd-air-quality/public/partials/linechart.php
- > /wp-content/plugins/wp-mkd-air-quality/public/partials/map.php
- 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: units_selector in wp-content/plugins/wp-mkd-air-quality/public/partials/map.php on line 10
- > PHP Notice
Undefined variable: station in wp-content/plugins/wp-mkd-air-quality/public/partials/linechart.php on line 18
- > PHP Notice
Undefined variable: unit in wp-content/plugins/wp-mkd-air-quality/public/partials/map.php on line 9
- > PHP Notice
Undefined variable: stations_selector in wp-content/plugins/wp-mkd-air-quality/public/partials/linechart.php on line 13
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-mkd-air-quality/public/partials/rank.php:45
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-mkd-air-quality/includes/data/units.php:16
- > PHP Notice
Undefined variable: date in wp-content/plugins/wp-mkd-air-quality/public/partials/linechart.php on line 15
- > PHP Notice
Undefined variable: xlabels in wp-content/plugins/wp-mkd-air-quality/public/partials/linechart.php on line 14
- > PHP Notice
Undefined variable: stations_selector in wp-content/plugins/wp-mkd-air-quality/public/partials/linechart.php on line 20
- > PHP Notice
Undefined variable: timemode in wp-content/plugins/wp-mkd-air-quality/public/partials/linechart.php on line 17
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: macedonia, airquality, skopje
wp-mkd-air-quality/wp-mkd-air-quality.php Passed 13 tests
"MKD Air Quality" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Show air quality data for multiple air quality stations in Macedonia
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
There were no executable files found in this plugin18,298 lines of code in 34 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 7 | 5,262 | 6,951 | 16,302 |
PHP | 22 | 254 | 791 | 1,164 |
CSS | 3 | 61 | 24 | 657 |
PO File | 1 | 60 | 75 | 135 |
Markdown | 1 | 25 | 0 | 40 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 8.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 35.00 |
Average method complexity | 2.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 56 | |
▷ Static methods | 6 | 10.71% |
▷ Public methods | 46 | 82.14% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 10 | 17.86% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 13 | |
▷ Global constants | 1 | 7.69% |
▷ Class constants | 12 | 92.31% |
▷ Public constants | 12 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/resources/leaflet/images/marker-icon-2x.png | 2.41KB | 2.52KB | 0.00% |
public/resources/leaflet/images/layers.png | 0.68KB | 1.05KB | 0.00% |
public/resources/leaflet/images/marker-icon.png | 1.43KB | 1.55KB | 0.00% |
public/resources/leaflet/images/layers-2x.png | 1.23KB | 1.67KB | 0.00% |
public/resources/leaflet/images/marker-shadow.png | 0.60KB | 1.16KB | 0.00% |