Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼4.22ms] Passed 4 tests
This is a short check of server-side resources used by WPEM - REST API
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 39.56 ▼3.43 |
Dashboard /wp-admin | 3.31 ▲0.00 | 43.24 ▼4.49 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.18 ▼1.37 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 82.42 ▼7.59 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.64 ▲2.47 |
Server storage [IO: ▲0.39MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WPEM - REST API
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.28 ▼0.07 | 1.79 ▼0.08 | 45.43 ▲1.05 |
Dashboard /wp-admin | 2,192 ▲15 | 5.52 ▼0.14 | 85.67 ▼10.66 | 38.45 ▼5.72 |
Posts /wp-admin/edit.php | 2,100 ▲3 | 1.94 ▼0.00 | 32.64 ▼3.63 | 34.82 ▼0.28 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 23.25 ▲0.28 | 676.96 ▼23.92 | 53.18 ▼3.27 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.23 ▲0.04 | 93.93 ▼1.12 | 44.17 ▼0.93 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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 fix the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wpem-rest-api/templates/wpem-dashboard-rest-api-settings.php
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/wpem-rest-api/admin/templates/wpem-rest-settings-panel.php:2
- > PHP Fatal error
Uncaught Error: Class 'WPEM_Rest_API_Keys' not found in wp-content/plugins/wpem-rest-api/admin/templates/wpem-rest-settings-api-access.php:2
- > PHP Fatal error
Uncaught Error: Class 'WPEM_Rest_APP_Branding' not found in wp-content/plugins/wpem-rest-api/admin/templates/wpem-rest-settings-app-branding.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in wpem-rest-api/assets to your readme.txt
wpem-rest-api/wpem-rest-api.php 92% from 13 tests
The main PHP script in "WPEM - REST API" version 1.0.4 is automatically included on every request by WordPress
It is important to fix the following:
- Domain Path: The domain path is invalid: folder "/languages" does not exist
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 detected5,646 lines of code in 30 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 24 | 727 | 1,911 | 4,934 |
CSS | 2 | 3 | 3 | 443 |
JavaScript | 2 | 16 | 23 | 137 |
SVG | 2 | 0 | 2 | 132 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 32.69 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 79.00 |
Average method complexity | 3.72 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 16 | |
▷ Abstract classes | 3 | 18.75% |
▷ Concrete classes | 13 | 81.25% |
▷ Final classes | 0 | 0.00% |
Methods | 183 | |
▷ Static methods | 5 | 2.73% |
▷ Public methods | 118 | 64.48% |
▷ Protected methods | 49 | 26.78% |
▷ Private methods | 16 | 8.74% |
Functions | 8 | |
▷ Named functions | 7 | 87.50% |
▷ Anonymous functions | 1 | 12.50% |
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.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/moon.png | 1.48KB | 0.85KB | ▼ 42.88% |
assets/images/sun.png | 1.42KB | 0.42KB | ▼ 70.19% |