Benchmarks
Plugin footprint 65% 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: ▼1.77MB] [CPU: ▼48.78ms] Passed 4 tests
This is a short check of server-side resources used by Post Preview Card
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.22 ▼1.24 | 5.31 ▼35.93 |
Dashboard /wp-admin | 2.24 ▼1.07 | 10.21 ▼37.44 |
Posts /wp-admin/edit.php | 2.24 ▼1.12 | 7.66 ▼39.41 |
Add New Post /wp-admin/post-new.php | 2.24 ▼3.65 | 6.93 ▼82.33 |
Media Library /wp-admin/upload.php | 2.24 ▼0.99 | 7.52 ▼26.49 |
Widgets /wp-admin/admin.php?page=peaw_settings_widgets | 2.24 | 6.96 |
Layouts /wp-admin/admin.php?page=peaw_layout_settings | 2.24 | 8.07 |
General /wp-admin/admin.php?page=peaw_settings | 2.24 | 6.94 |
Server storage [IO: ▲0.93MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: no new tables, 12 new options
New WordPress options |
---|
widget_peaw_single_post_by_id |
peaw_activate_post_by_id |
widget_recent-posts |
peaw_activate_post_by_cat |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
widget_peaw_random_post_by_category |
db_upgraded |
widget_peaw_multiple_posts |
... |
Browser metrics Passed 4 tests
Checking browser requirements for Post Preview Card
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,841 ▲106 | 13.22 ▼1.18 | 1.66 ▼0.26 | 52.94 ▲8.32 |
Dashboard /wp-admin | 2,237 ▲52 | 5.83 ▼0.02 | 114.19 ▲12.19 | 42.84 ▼3.31 |
Posts /wp-admin/edit.php | 2,123 ▲28 | 2.02 ▲0.01 | 41.55 ▼13.85 | 36.49 ▼8.28 |
Add New Post /wp-admin/post-new.php | 1,567 ▲53 | 20.99 ▲3.50 | 703.05 ▲60.53 | 53.93 ▲8.76 |
Media Library /wp-admin/upload.php | 1,422 ▲43 | 4.19 ▼0.08 | 95.52 ▼6.89 | 42.45 ▼0.38 |
Widgets /wp-admin/admin.php?page=peaw_settings_widgets | 819 | 2.04 | 23.50 | 25.15 |
Layouts /wp-admin/admin.php?page=peaw_layout_settings | 836 | 2.02 | 39.96 | 39.29 |
General /wp-admin/admin.php?page=peaw_settings | 800 | 2.06 | 27.52 | 29.75 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/post-preview-card/includes/peaw-class.php+62
Non-static method Peaw_Ajax_Register_Manager::peaw_register_ajax() should not be called statically
- This plugin does not fully uninstall, leaving 12 options in the database
- peaw_activate_post_by_cat
- widget_peaw_random_post_by_category
- theysaidso_admin_options
- peaw_activate_peaw_multiple_posts
- widget_recent-posts
- widget_peaw_single_post_by_id
- widget_peaw_multiple_posts
- can_compress_scripts
- db_upgraded
- peaw_activate_post_by_id
- ...
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=peaw_settings
- > Deprecated in wp-content/plugins/post-preview-card/includes/peaw-class.php+62
Non-static method Peaw_Ajax_Register_Manager::peaw_register_ajax() should not be called statically
SRP 50% 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
Almost there! Just fix the following items
- 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Peaw_Options_Base' not found in wp-content/plugins/post-preview-card/includes/options/managers/peaw_widget_register_manager.php:19
- > PHP Fatal error
Uncaught Error: Interface 'Peaw_Layouts_Base' not found in wp-content/plugins/post-preview-card/includes/options/layouts/peaw_layout_original_card.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/post-preview-card/admin/partials/peaw-admin-settings-widgets-page.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Peaw_Options_Base' not found in wp-content/plugins/post-preview-card/includes/options/managers/peaw_general_settings_manager.php:15
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/post-preview-card/includes/widgets/peaw-single-post-by-id.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/post-preview-card/admin/partials/peaw-admin-settings-general-page.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Peaw_Options_Base' not found in wp-content/plugins/post-preview-card/includes/options/managers/peaw_layouts_manager.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-preview-card/includes/peaw-class.php:163
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/post-preview-card/includes/widgets/peaw-random-post-by-category.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Peaw_Ajax_Base' not found in wp-content/plugins/post-preview-card/includes/options/managers/peaw_ajax_register_manager.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: siteorigin, widget for elementor, elementor, preview, beaver...
post-preview-card/post-preview-card.php 92% from 13 tests
The primary PHP file in "Post Preview Card" version 2.0.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,816 lines of code in 33 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
Sass | 5 | 206 | 0 | 1,901 |
CSS | 5 | 405 | 6 | 1,466 |
PHP | 21 | 388 | 521 | 1,349 |
Markdown | 1 | 16 | 0 | 55 |
JavaScript | 1 | 7 | 0 | 45 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 12.73 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 56.00 |
Average method complexity | 3.71 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 1 | 8.33% |
▷ Concrete classes | 11 | 91.67% |
▷ Final classes | 0 | 0.00% |
Methods | 72 | |
▷ Static methods | 34 | 47.22% |
▷ Public methods | 66 | 91.67% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 8.33% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/image-not-found.png | 50.89KB | 20.63KB | ▼ 59.46% |