90% wc-stock-amount-report

Code Review | WC Stock Amount Report

WordPress plugin WC Stock Amount Report scored90%from 54 tests.

About plugin

  • Plugin page: wc-stock-amount-r...
  • Plugin version: 0.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8.0
  • WordPress version: 6.3.1
  • First release: Mar 21, 2017
  • Latest release: Jun 18, 2017
  • Number of updates: 27
  • Update frequency: every 3.2 days
  • Top authors: thiagogsrwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /601 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.75ms] Passed 4 tests

Server-side resources used by WC Stock Amount Report
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.96 ▼15.08
Dashboard /wp-admin3.31 ▲0.0147.55 ▼8.47
Posts /wp-admin/edit.php3.36 ▲0.0149.87 ▲1.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.50 ▼12.49
Media Library /wp-admin/upload.php3.24 ▲0.0136.37 ▲1.05

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WC Stock Amount Report
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.60 ▼0.991.84 ▼0.0340.97 ▼5.83
Dashboard /wp-admin2,209 ▲215.86 ▼0.02102.03 ▼12.5938.96 ▼7.13
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0137.58 ▼0.6633.35 ▼6.59
Add New Post /wp-admin/post-new.php1,514 ▼2317.45 ▼0.78643.94 ▼23.8063.15 ▲14.59
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.0198.93 ▼1.1545.74 ▲2.07

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (Example how much I have in my available stock.) image required
The official readme.txt is a good inspiration

wc-stock-amount-report/wc-stock-amount-report.php Passed 13 tests

The entry point to "WC Stock Amount Report" version 0.0.11 is a PHP file that has certain tags in its header comment area
97 characters long description:
WooCommerce report to visualize how much you have in your available stock if you sale everything.

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
Everything looks great! No dangerous files found in this plugin182 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23897127
JSON10028
JavaScript11117
Markdown17010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods433.33%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
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
No PNG files were detected