89% product-stock-export-and-import-for-woocommerce

Code Review | Product Stock Import and Export for WooCommerce

WordPress plugin Product Stock Import and Export for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: product-stock-exp...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 14, 2018
  • Latest release: Jun 14, 2018
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: shravanjbp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 724 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.82ms] Passed 4 tests

Analyzing server-side resources used by Product Stock Import and Export for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.81 ▼6.75
Dashboard /wp-admin3.31 ▲0.0140.34 ▼9.23
Posts /wp-admin/edit.php3.36 ▲0.0144.14 ▼2.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0177.40 ▼16.83
Media Library /wp-admin/upload.php3.23 ▲0.0031.83 ▲0.69

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Product Stock Import and Export for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.75 ▼0.881.68 ▼0.4637.31 ▼6.13
Dashboard /wp-admin2,209 ▲215.89 ▲0.98111.19 ▲2.6043.48 ▲1.04
Posts /wp-admin/edit.php2,086 ▼31.99 ▲0.0335.23 ▼1.0736.42 ▲1.55
Add New Post /wp-admin/post-new.php1,533 ▲1423.02 ▼0.14655.92 ▼12.8452.64 ▼16.69
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0791.83 ▼3.1440.15 ▼4.90

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: management, inventory, export, woocommerce, stock...

product-stock-export-and-import-for-woocommerce/product-stock-import-export.php 85% from 13 tests

The main PHP script in "Product Stock Import and Export for WooCommerce" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("product-stock-export-and-import-for-woocommerce.php" instead of "product-stock-import-export.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected206 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15428206

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin