Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▼0.03MB] [CPU: ▼142.88ms] Passed 4 tests
Analyzing server-side resources used by Mockups
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.68 ▼0.15 | 25.13 ▼9.78 |
Dashboard /wp-admin | 3.08 ▲0.03 | 49.29 ▲4.29 |
Posts /wp-admin/edit.php | 3.13 ▲0.02 | 49.60 ▼2.32 |
Add New Post /wp-admin/post-new.php | 5.43 ▼0.00 | 97.16 ▼563.72 |
Media Library /wp-admin/upload.php | 3.02 ▲0.02 | 36.31 ▲5.24 |
Server storage [IO: ▲3.70MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Mockups
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,813 ▲241 | 16.17 ▲0.42 | 14.94 ▲8.36 | 48.31 ▼9.25 |
Dashboard /wp-admin | 2,973 ▲39 | 6.04 ▼0.09 | 138.82 ▼11.89 | 111.26 ▼7.61 |
Posts /wp-admin/edit.php | 2,739 ▲3 | 2.70 ▼0.12 | 69.45 ▼1.06 | 94.21 ▲1.28 |
Add New Post /wp-admin/post-new.php | 1,694 ▲11 | 17.81 ▼0.82 | 381.14 ▼3.15 | 131.87 ▲14.24 |
Media Library /wp-admin/upload.php | 1,807 ▼0 | 5.02 ▲0.01 | 145.94 ▼15.77 | 118.25 ▼10.69 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully
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)
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function mockups\\add_action() in wp-content/plugins/mockups/lib/enqueue-scripts.php:38
- > PHP Fatal error
Uncaught Error: Call to undefined function mockups\\iphonex\\add_action() in wp-content/plugins/mockups/blocks/iphonex/index.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: iphonex, devices, screenshot, mobile, mockups...
mockups/mockups.php Passed 13 tests
The main PHP script in "Mockups" version 1.0.2 is automatically included on every request by WordPress
58 characters long description:
Beautiful device mockups you can use right from WordPress.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected763 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 8 | 35 | 30 | 490 |
PHP | 3 | 37 | 42 | 108 |
Sass | 3 | 6 | 6 | 55 |
JSON | 1 | 0 | 0 | 38 |
CSS | 3 | 9 | 4 | 37 |
Markdown | 1 | 11 | 0 | 20 |
YAML | 1 | 2 | 0 | 15 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
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 | 2 | |
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 | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.91MB with 0.45MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
wp-content/uploads/2019/10/27-original.png | 824.28KB | 1,310.04KB | 0.00% |
wp-content/uploads/2019/10/launch-ui-image-139x300.png | 29.32KB | 12.29KB | ▼ 58.10% |
wp-content/uploads/2019/10/launch-ui-image-150x150.png | 9.59KB | 3.68KB | ▼ 61.61% |
wp-content/uploads/2019/10/launch-ui-image.png | 73.47KB | 15.32KB | ▼ 79.14% |