90% stock-exporter-for-woocommerce

Code Review | Stock Exporter for WooCommerce

WordPress plugin Stock Exporter for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: stock-exporter-fo...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 19, 2015
  • Latest release: Apr 17, 2023
  • Number of updates: 46
  • Update frequency: every 58.8 days
  • Top authors: webdados (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /19,433 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.34ms] Passed 4 tests

This is a short check of server-side resources used by Stock Exporter for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.24 ▲1.25
Dashboard /wp-admin3.44 ▲0.1346.75 ▼2.81
Posts /wp-admin/edit.php3.55 ▲0.2046.64 ▼2.95
Add New Post /wp-admin/post-new.php6.02 ▲0.1385.07 ▼20.85
Media Library /wp-admin/upload.php3.36 ▲0.1337.57 ▲3.95

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Stock Exporter for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.26 ▼0.091.60 ▼0.1143.56 ▼3.54
Dashboard /wp-admin2,230 ▲535.58 ▼0.0983.00 ▼8.5585.40 ▲45.94
Posts /wp-admin/edit.php2,115 ▲182.07 ▲0.1137.33 ▲3.1933.38 ▼0.55
Add New Post /wp-admin/post-new.php1,572 ▲4623.25 ▼0.58695.50 ▲63.7557.13 ▲6.78
Media Library /wp-admin/upload.php1,432 ▲294.19 ▼0.0195.56 ▼3.7872.71 ▲29.50

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
5 plugin tags: stock, webdados, ecommerce, e-commerce, woocommerce

stock-exporter-for-woocommerce/woocommerce-stock-exporter.php 92% from 13 tests

The principal PHP file in "Stock Exporter for WooCommerce" v. 1.2.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("stock-exporter-for-woocommerce.php" instead of "woocommerce-stock-exporter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin813 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP343143813

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity142.00
▷ Minimum class complexity142.00
▷ Maximum class complexity142.00
Average method complexity8.05
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
webdados_invoicexpress_nag/invoicexpress-woocommerce-logo.png8.10KB7.67KB▼ 5.25%