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
Install script ran successfully
Server metrics [RAM: ▼0.62MB] [CPU: ▼4.15ms] Passed 4 tests
An overview of server-side resources used by Masoffer Product Listing
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.71 ▲0.25 | 50.37 ▲15.22 |
Dashboard /wp-admin | 3.35 ▲0.01 | 56.34 ▼4.66 |
Posts /wp-admin/edit.php | 3.47 ▲0.11 | 55.95 ▲13.77 |
Add New Post /wp-admin/post-new.php | 3.23 ▼2.66 | 45.98 ▼38.86 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 47.36 ▲13.16 |
Shortcode /wp-admin/admin.php?page=mo-prod-page-short-code | 3.22 | 38.29 |
Edit Shortcode /wp-admin/admin.php?page=mo-prod-page-edit-short-code | 3.22 | 40.45 |
Add Shortcode /wp-admin/admin.php?page=mo-prod-page-add-short-code | 3.25 | 39.81 |
Settings /wp-admin/admin.php?page=mo-prod-page-settings | 3.25 | 38.27 |
Server storage [IO: ▲2.63MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 43 new files
Database: 2 new tables, 8 new options
New tables |
---|
wp_mo_product_listing_url |
wp_mo_product_listing_shortcode |
New WordPress options |
---|
widget_theysaidso_widget |
mo_prod_data_option_version |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
mo_prod_db_version |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Masoffer Product Listing
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,819 ▲58 | 14.35 ▼0.20 | 1.73 ▲0.23 | 40.44 ▼0.13 |
Dashboard /wp-admin | 2,222 ▲42 | 5.57 ▼0.05 | 87.08 ▲4.54 | 62.45 ▲26.80 |
Posts /wp-admin/edit.php | 2,127 ▲27 | 2.00 ▼0.01 | 33.34 ▼2.21 | 35.50 ▲4.46 |
Add New Post /wp-admin/post-new.php | 1,568 ▲42 | 23.52 ▲0.07 | 747.50 ▲92.29 | 47.74 ▼22.21 |
Media Library /wp-admin/upload.php | 1,433 ▲39 | 4.12 ▼0.09 | 96.20 ▲0.51 | 75.15 ▲30.26 |
Shortcode /wp-admin/admin.php?page=mo-prod-page-short-code | 975 | 2.07 | 26.73 | 26.37 |
Edit Shortcode /wp-admin/admin.php?page=mo-prod-page-edit-short-code | 786 | 2.01 | 22.49 | 23.66 |
Add Shortcode /wp-admin/admin.php?page=mo-prod-page-add-short-code | 998 | 2.07 | 28.23 | 24.81 |
Settings /wp-admin/admin.php?page=mo-prod-page-settings | 969 | 1.99 | 21.18 | 25.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin does not fully uninstall, leaving 2 tables in the database
- wp_mo_product_listing_shortcode
- wp_mo_product_listing_url
- This plugin does not fully uninstall, leaving 8 options in the database
- widget_recent-posts
- mo_prod_data_option_version
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- mo_prod_db_version
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=mo-prod-page-edit-short-code
- > Notice in wp-content/plugins/masoffer-product-listing/masoffer-product-listing.php+493
Undefined index: id
- > GET request to /wp-admin/admin.php?page=mo-prod-page-short-code
- > Notice in wp-content/plugins/masoffer-product-listing/masoffer-product-listing.php+462
Undefined index: delete
- > GET request to /wp-admin/admin.php?page=mo-prod-page-short-code
- > Notice in wp-content/plugins/masoffer-product-listing/masoffer-product-listing.php+1047
Undefined index: s
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=mo-prod-page-add-short-code
- > Notice in wp-content/plugins/masoffer-product-listing/views/add_short_code.php+50
Undefined variable: data
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=mo-prod-page-add-short-code
- > Notice in wp-content/plugins/masoffer-product-listing/views/add_short_code.php+50
Trying to access array offset on value of type null
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
Almost there! Just fix the following items
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/masoffer-product-listing/views/products.php
- > /wp-content/plugins/masoffer-product-listing/views/add_short_code.php
- > /wp-content/plugins/masoffer-product-listing/views/edit_short_code.php
- 68× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: shortcodeInfo in wp-content/plugins/masoffer-product-listing/views/edit_short_code.php on line 25
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/masoffer-product-listing/views/edit_short_code.php on line 85
- > PHP Notice
Undefined variable: dataOption in wp-content/plugins/masoffer-product-listing/views/add_short_code.php on line 66
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/masoffer-product-listing/views/edit_short_code.php on line 50
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/masoffer-product-listing/views/short_code.php:15
- > PHP Notice
Undefined variable: dataOption in wp-content/plugins/masoffer-product-listing/views/edit_short_code.php on line 77
- > PHP Notice
Undefined variable: dataOption in wp-content/plugins/masoffer-product-listing/views/add_short_code.php on line 59
- > PHP Notice
Undefined variable: dataOption in wp-content/plugins/masoffer-product-listing/views/add_short_code.php on line 62
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/masoffer-product-listing/views/edit_short_code.php on line 70
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/masoffer-product-listing/views/edit_short_code.php on line 85
- > PHP Notice
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 Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: affiliate, marketing
masoffer-product-listing/masoffer-product-listing.php Passed 13 tests
The entry point to "Masoffer Product Listing" version 1.2.8 is a PHP file that has certain tags in its header comment area
43 characters long description:
Plugin hỗ trợ hiển thị sản phẩm
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
Good job! No executable or dangerous file extensions detected5,820 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 5 | 1,063 | 19 | 4,307 |
PHP | 7 | 177 | 259 | 1,018 |
JavaScript | 7 | 25 | 7 | 339 |
Sass | 1 | 4 | 0 | 156 |
PHP code Passed 2 tests
An overview 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.33 |
Average class complexity | 61.50 |
▷ Minimum class complexity | 16.00 |
▷ Maximum class complexity | 107.00 |
Average method complexity | 3.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 47 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 45 | 95.74% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 4.26% |
Functions | 6 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 6 | 100.00% |
Constants | 27 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 27 | 100.00% |
▷ Public constants | 27 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icon_shopee-vn.png | 0.61KB | 0.68KB | 0.00% |
mo2-300x51.png | 12.21KB | 6.37KB | ▼ 47.81% |
images/mo2-300x51.png | 12.21KB | 6.37KB | ▼ 47.81% |
fav_mo64.png | 3.87KB | 2.28KB | ▼ 41.22% |
images/fav_mo20.png | 0.91KB | 0.96KB | 0.00% |