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.00MB] [CPU: ▼5.73ms] Passed 4 tests
An overview of server-side resources used by PhotoCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 36.00 ▲0.03 |
Dashboard /wp-admin | 3.31 ▲0.00 | 45.50 ▼4.63 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 41.20 ▼4.63 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 78.41 ▼10.53 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 29.98 ▼3.13 |
Server storage [IO: ▲0.45MB] [DB: ▲0.07MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for PhotoCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.74 ▲0.19 | 1.81 ▲0.20 | 43.41 ▼1.06 |
Dashboard /wp-admin | 2,198 ▲21 | 5.62 ▼0.04 | 94.73 ▲3.43 | 41.36 ▼3.03 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▲0.01 | 35.80 ▼1.07 | 31.57 ▼1.52 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.17 ▲0.35 | 625.83 ▼54.51 | 55.40 ▲0.36 |
Media Library /wp-admin/upload.php | 1,403 ▼0 | 4.22 ▼0.06 | 95.05 ▲1.18 | 42.23 ▼2.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- 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
Good news, no errors were detected
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 task of outputting text when accessed with GET requests:
- > /wp-content/plugins/photocommerce/admin/partials/generate_key.php
- > /wp-content/plugins/photocommerce/admin/partials/revoke_key.php
- > /wp-content/plugins/photocommerce/public/partials/photo-commerce-public-display.php
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/photocommerce/rest/class-photo-commerce-rest-categories.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/photocommerce/rest/class-photo-commerce-rest-products.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/photocommerce/admin/partials/photo-commerce-admin-display.php:24
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: product editing, woocommerce, product management, e-commerce
photocommerce/photo-commerce.php 85% from 13 tests
The main PHP file in "PhotoCommerce" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("photocommerce.php" instead of "photo-commerce.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin817 lines of code in 24 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 234 | 721 | 807 |
JavaScript | 4 | 4 | 60 | 9 |
CSS | 3 | 0 | 14 | 1 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 7.40 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 39.00 |
Average method complexity | 2.21 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 53 | |
▷ Static methods | 2 | 3.77% |
▷ Public methods | 42 | 79.25% |
▷ Protected methods | 4 | 7.55% |
▷ Private methods | 7 | 13.21% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 92.56KB | 27.10KB | ▼ 70.72% |