Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.13MB] [CPU: ▼4.72ms] Passed 4 tests
This is a short check of server-side resources used by SmartCrop
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.60 ▲0.14 | 40.47 ▲1.27 |
Dashboard /wp-admin | 3.47 ▲0.17 | 53.72 ▼0.76 |
Posts /wp-admin/edit.php | 3.52 ▲0.17 | 43.76 ▼4.03 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 84.06 ▼12.70 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 35.63 ▼1.40 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
SmartCrop: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,814 ▲28 | 14.24 ▲0.04 | 1.91 ▼0.14 | 43.74 ▲0.51 |
Dashboard /wp-admin | 2,198 ▲18 | 5.60 ▲0.00 | 80.56 ▼19.19 | 39.13 ▼10.10 |
Posts /wp-admin/edit.php | 2,100 ▲3 | 1.98 ▼0.02 | 34.95 ▼2.15 | 32.48 ▼2.30 |
Add New Post /wp-admin/post-new.php | 1,527 ▼1 | 23.37 ▲0.15 | 646.62 ▼31.69 | 55.70 ▲1.68 |
Media Library /wp-admin/upload.php | 1,403 ▼0 | 4.20 ▼0.04 | 94.98 ▼4.11 | 44.63 ▲0.22 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
- 12× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-imagick.php on line 9
- > PHP Warning
require_once(ABSPATHWPINC/class-wp-image-editor.php): failed to open stream: No such file or directory in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-gd.php on line 9
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-imagick.php on line 9
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHWPINC/class-wp-image-editor.php' (include_path='.:/usr/share/php') in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-imagick.php on line 9
- > PHP Warning
Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-gd.php on line 9
- > PHP Warning
require_once(ABSPATHWPINC/class-wp-image-editor.php): failed to open stream: No such file or directory in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-imagick.php on line 9
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHWPINC/class-wp-image-editor.php' (include_path='.:/usr/share/php') in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-gd.php on line 9
- > PHP Warning
Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-imagick.php on line 9
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-gd.php on line 9
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHWPINC/class-wp-image-editor.php' (include_path='.:/usr/share/php') in wp-content/plugins/smartcrop/includes/class-smartcrop-wp-image-editor-imagick.php on line 9
- > PHP Warning
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
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: thumbnails, crop, thumbnail
smartcrop/smartcrop.php Passed 13 tests
The primary PHP file in "SmartCrop" version 1.0.0 is used by WordPress to initiate all plugin functionality
96 characters long description:
Automatically crops image thumbnails based on their contents instead of just centering the crop.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected429 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 156 | 398 | 429 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 13.40 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 22.00 |
Average method complexity | 3.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 2 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 31 | |
▷ Static methods | 2 | 6.45% |
▷ Public methods | 30 | 96.77% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 3.23% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin