84% stock-export-and-import-for-woocommerce

Code Review | Stock Export and Import for WooCommerce

WordPress plugin Stock Export and Import for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: stock-export-and-...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2015
  • Latest release: Oct 5, 2023
  • Number of updates: 16
  • Update frequency: every 177.7 days
  • Top authors: hearken (62.5%)aspengrovestudios (43.75%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /8,714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.72ms] Passed 4 tests

A check of server-side resources used by Stock Export and Import for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0434.54 ▼4.29
Dashboard /wp-admin3.35 ▲0.0045.06 ▼18.16
Posts /wp-admin/edit.php3.40 ▲0.0447.19 ▼0.71
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.90 ▲3.24
Media Library /wp-admin/upload.php3.27 ▲0.0435.00 ▲0.29

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Stock Export and Import for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.511.69 ▲0.0841.88 ▼4.67
Dashboard /wp-admin2,206 ▲185.85 ▼0.06109.65 ▲0.9641.15 ▲1.10
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0041.39 ▲0.4336.07 ▼1.88
Add New Post /wp-admin/post-new.php1,533 ▲1223.13 ▲0.07657.80 ▼38.5762.19 ▲8.70
Media Library /wp-admin/upload.php1,391 ▼04.20 ▲0.0097.53 ▼14.2642.49 ▼4.25

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 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/stock-export-and-import-for-woocommerce/plugin-credit.php:10
    • > PHP Notice
      Undefined variable: potent_slug in wp-content/plugins/stock-export-and-import-for-woocommerce/plugin-credit.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stock-export-and-import-for-woocommerce/stock-export-and-import-for-woocommerce.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: report, inventory, import, excel, export...

stock-export-and-import-for-woocommerce/stock-export-and-import-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Stock Export and Import for WooCommerce" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
112 characters long description:
Export and import stock statuses and quantities for WooCommerce products in Comma-Separated Values (CSV) format.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin220 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26862220

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.61
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/ags-logo.png9.21KB4.74KB▼ 48.60%