Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼4.22ms] 75% from 4 tests
Server-side resources used by NCM API
The following require your attention
- CPU: Try to keep total CPU usage under 500.00ms (currently 1,043.30ms on /wp-admin/admin.php?page=ncm-api-settings)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 43.72 ▲2.75 |
Dashboard /wp-admin | 3.33 ▲0.03 | 46.25 ▼4.61 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 47.11 ▼2.86 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 84.41 ▼10.88 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 35.83 ▲1.49 |
NCM Orders /wp-admin/admin.php?page=ncm-orders-list | 3.28 | 32.42 |
Dashboard /wp-admin/admin.php?page=ncm-api-settings | 3.27 | 1,043.30 |
Non NCM Orders /wp-admin/admin.php?page=non-ncm-orders-list | 3.29 | 31.14 |
Server storage [IO: ▲16.49MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,748 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
recovery_mode_email_last_sent |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
NCM API: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,935 ▲200 | 13.63 ▼0.99 | 5.57 ▲4.01 | 42.50 ▲2.54 |
Dashboard /wp-admin | 2,233 ▲41 | 4.81 ▼0.17 | 108.07 ▼9.19 | 38.49 ▼4.80 |
Posts /wp-admin/edit.php | 2,116 ▲27 | 2.04 ▲0.02 | 39.29 ▼1.35 | 35.64 ▼2.25 |
Add New Post /wp-admin/post-new.php | 1,556 ▲42 | 23.05 ▲5.56 | 664.64 ▼5.25 | 63.04 ▲11.49 |
Media Library /wp-admin/upload.php | 1,409 ▲24 | 4.21 ▼0.11 | 96.07 ▼5.08 | 41.17 ▼0.47 |
NCM Orders /wp-admin/admin.php?page=ncm-orders-list | 724 | 2.08 | 17.43 | 39.73 |
Dashboard /wp-admin/admin.php?page=ncm-api-settings | 848 | 2.35 | 33.09 | 32.56 |
Non NCM Orders /wp-admin/admin.php?page=non-ncm-orders-list | 724 | 2.18 | 11.57 | 21.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- This plugin did not uninstall successfully, leaving 7 options in the database
- db_upgraded
- recovery_mode_email_last_sent
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
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
Please fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=ncm-orders-list
- > Error in wp-content/plugins/ncm-api/admin/partials/ncm-api-order-list.php+2
Uncaught Error: Class 'WC_Order_Query' not found in wp-content/plugins/ncm-api/admin/partials/ncm-api-order-list.php:2
Stack trace:
#0 wp-content/plugins/ncm-api/admin/class-ncm-api-admin.php(191): include_once()
#1 wp-includes/class-wp-hook.php(310): Ncm_Api_Admin->ncm_orders()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown- > GET request to /wp-admin/admin.php?page=non-ncm-orders-list
- > Error in wp-content/plugins/ncm-api/admin/partials/all-order-list.php+2
Uncaught Error: Class 'WC_Order_Query' not found in wp-content/plugins/ncm-api/admin/partials/all-order-list.php:2
Stack trace:
#0 wp-content/plugins/ncm-api/admin/class-ncm-api-admin.php(197): include_once()
#1 wp-includes/class-wp-hook.php(310): Ncm_Api_Admin->non_ncm_orders()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown
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
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/ncm-api/admin/partials/ncm-api-admin-display.php
- > /wp-content/plugins/ncm-api/public/partials/ncm-api-public-display.php
- 9× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WC_Order_Query' not found in wp-content/plugins/ncm-api/admin/partials/all-order-list.php:2
- > PHP Warning
Use of undefined constant NCM_API_PLUGIN_URI - assumed 'NCM_API_PLUGIN_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/ncm-api/admin/partials/ncm-api-dashboard.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ncm-api/includes/upload-order.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ncm-api/includes/custom-input-order-edit.php:3
- > PHP Fatal error
Uncaught Error: Class 'WC_Order_Query' not found in wp-content/plugins/ncm-api/admin/partials/ncm-api-order-list.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ncm-api/includes/order-list-column.php:25
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ncm-api/includes/order-details.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ncm-api/includes/view-order-comment.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/ncm-api/admin/partials/ncm-api-dashboard.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 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
Attributes that need to be fixed:
- Screenshots: These screenshots do not have images: #1 (Add the Token Provided by NCM to link your WordPress site to the Vendor Portal of NCM.), #2 (Go to “Non NCM Order” submenu to see all the orders that have been placed on our WordPress site.), #3 (Go to "NCM Order" submenu to veiw all the order placed to NCM Portal using your WordPress Site.), #4 (Add Comment and place update.), #5 (Place Order to NCM Portal from Woocommerce Edit page.), #6 (Place Order to NCM Portal from NON NCM Order Table View.)
ncm-api/ncm-api.php Passed 13 tests
The primary PHP file in "NCM API" version 1.0.0 is used by WordPress to initiate all plugin functionality
96 characters long description:
NCM API Plugin helps all the NCM Vendors to connect their wordpress website with the NCM Portal.
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 detected130,626 lines of code in 1,718 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 60,839 |
YAML | 4 | 0 | 0 | 25,394 |
SVG | 1,615 | 0 | 12 | 16,003 |
JavaScript | 21 | 927 | 392 | 8,975 |
CSS | 19 | 3,676 | 94 | 8,801 |
Sass | 18 | 507 | 34 | 4,780 |
LESS | 18 | 504 | 55 | 4,738 |
PHP | 21 | 306 | 574 | 1,096 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 3.12 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 11.00 |
Average method complexity | 1.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 29 | |
▷ Static methods | 2 | 6.90% |
▷ Public methods | 24 | 82.76% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 17.24% |
Functions | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.94MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/Screenshot-1.png | 114.16KB | 41.73KB | ▼ 63.45% |
assets/Screenshot-4.png | 194.54KB | 65.00KB | ▼ 66.59% |
assets/square-icon.png | 60.29KB | 27.25KB | ▼ 54.81% |
assets/Screenshot-3.png | 153.05KB | 52.46KB | ▼ 65.73% |
assets/icon.png | 27.69KB | 7.82KB | ▼ 71.74% |