84% ni-woocommerce-product-editor

Code Review | Ni WooCommerce Bulk Product Editor

WordPress plugin Ni WooCommerce Bulk Product Editor scored 84% from 54 tests.

About plugin

  • Plugin page: ni-woocommerce-pr...
  • Plugin version: 1.4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2017
  • Latest release: Feb 19, 2023
  • Number of updates: 23
  • Update frequency: every 83.6 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.76ms] Passed 4 tests

Analyzing server-side resources used by Ni WooCommerce Bulk Product Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.11 ▼7.99
Dashboard /wp-admin3.33 ▲0.0344.08 ▼9.25
Posts /wp-admin/edit.php3.38 ▲0.0345.68 ▲2.38
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.82 ▼4.17
Media Library /wp-admin/upload.php3.25 ▲0.0234.56 ▲2.52
Ni Product Editor /wp-admin/admin.php?page=niwpe-product-editor3.3932.48
Dashboard /wp-admin/admin.php?page=niwpe-product-dashboard3.3429.23

Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
recovery_mode_email_last_sent
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Ni WooCommerce Bulk Product Editor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲8813.21 ▼1.381.48 ▼0.6136.26 ▼8.29
Dashboard /wp-admin2,226 ▲385.84 ▼0.04104.97 ▼5.5142.51 ▼2.88
Posts /wp-admin/edit.php2,094 ▲51.98 ▼0.0734.60 ▼0.0432.61 ▼3.79
Add New Post /wp-admin/post-new.php1,552 ▲3823.08 ▲5.53617.51 ▼53.1349.20 ▼0.27
Media Library /wp-admin/upload.php1,408 ▲204.21 ▲0.0395.01 ▼6.2442.82 ▼1.21
Ni Product Editor /wp-admin/admin.php?page=niwpe-product-editor9911.8030.4330.10
Dashboard /wp-admin/admin.php?page=niwpe-product-dashboard8431.146.4556.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=niwpe-product-dashboard
    • > Error in wp-content/plugins/ni-woocommerce-product-editor/includes/niwpe-dashboard.php+76
    Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/ni-woocommerce-product-editor/includes/niwpe-dashboard.php:76
    Stack trace:
    #0 wp-content/plugins/ni-woocommerce-product-editor/includes/ni-woocommerce-product-editor-init.php(69): NiWPE_Dashboard->get_niwpe_page()
    #1 wp-includes/class-wp-hook.php(310): Ni_WooCommerce_product_Editor_Init->add_page()
    #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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Dashboard Sales count and amount), #2 (Product editor)
The official readme.txt is a good inspiration

ni-woocommerce-product-editor/ni-woocommerce-product-editor.php 92% from 13 tests

"Ni WooCommerce Bulk Product Editor" version 1.4.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,585 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5232681,330
CSS22414181
JavaScript2131974

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity32.20
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png44.15KB27.56KB▼ 37.58%
screenshot-1.png38.64KB20.10KB▼ 47.97%