90% stock-snapshot-for-woocommerce

Code Review | Stock Snapshot for WooCommerce

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

About plugin

  • Plugin page: stock-snapshot-fo...
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 31, 2022
  • Latest release: Sep 26, 2023
  • Number of updates: 12
  • Update frequency: every 46.5 days
  • Top authors: algoritmika (66.67%)wpcodefactory (41.67%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Stock Snapshot for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.19 ▲0.89
Dashboard /wp-admin3.32 ▲0.0246.68 ▼8.80
Posts /wp-admin/edit.php3.37 ▲0.0150.97 ▲5.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.14 ▼0.79
Media Library /wp-admin/upload.php3.24 ▲0.0139.13 ▼8.35

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Stock Snapshot for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.131.77 ▲0.0944.12 ▼10.89
Dashboard /wp-admin2,195 ▲185.66 ▲0.0789.67 ▼12.6942.01 ▼2.94
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0240.99 ▲3.0735.76 ▲0.86
Add New Post /wp-admin/post-new.php1,526 ▼023.00 ▲0.05682.81 ▲49.9660.48 ▲0.93
Media Library /wp-admin/upload.php1,397 ▼04.18 ▼0.04105.66 ▼46.0148.59 ▼1.76

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: woocommerce, woo commerce, stock

stock-snapshot-for-woocommerce/stock-snapshot-for-woocommerce.php Passed 13 tests

"Stock Snapshot for WooCommerce" version 1.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
49 characters long description:
Keep track of your products stock in WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin808 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12150505808

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity10.09
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods50
▷ Static methods12.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin