79% wc-product-author

Code Review | Product Author for WooCommerce

WordPress plugin Product Author for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: wc-product-author
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 10, 2019
  • Latest release: Sep 7, 2023
  • Number of updates: 49
  • Update frequency: every 33.5 days
  • Top authors: nitin247 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /6,458 total downloads

Benchmarks

Plugin footprint 65% 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.54MB] [CPU: ▼1.06ms] Passed 4 tests

An overview of server-side resources used by Product Author for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.5947.41 ▲4.46
Dashboard /wp-admin3.90 ▲0.5954.88 ▲0.68
Posts /wp-admin/edit.php3.95 ▲0.5952.92 ▼1.26
Add New Post /wp-admin/post-new.php6.42 ▲0.5395.45 ▼8.12
Media Library /wp-admin/upload.php3.66 ▲0.4343.05 ▲5.26
Product Author for WooCommerce /wp-admin/admin.php?page=wc-product-author3.8942.03
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius4.0238.14

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 204 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
fs_accounts
theysaidso_admin_options
fs_debug_mode
fs_active_plugins
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Product Author for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.22 ▼0.131.98 ▲0.3333.92 ▼5.56
Dashboard /wp-admin2,209 ▲285.57 ▼0.1192.95 ▼6.1043.97 ▲2.22
Posts /wp-admin/edit.php2,121 ▲182.10 ▲0.1137.02 ▼3.5736.00 ▼3.74
Add New Post /wp-admin/post-new.php1,534 ▼323.64 ▲5.48635.24 ▲15.1857.46 ▼6.76
Media Library /wp-admin/upload.php1,417 ▲174.13 ▼0.1096.61 ▼18.2747.78 ▼0.69
Product Author for WooCommerce /wp-admin/admin.php?page=wc-product-author9771.6825.9460.06
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0691.7024.0228.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wc-product-author/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • fs_active_plugins
    • widget_recent-posts
    • widget_recent-comments
    • fs_accounts
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

wc-product-author/wc-product-author.php 92% from 13 tests

The main file in "Product Author for WooCommerce" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin50,659 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
PHP1218,04917,54833,665
PO File137,4509,05716,530
Markdown1680214
JavaScript33459194
JSON10027
XML13016
CSS130013

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity91.80
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,278
▷ Static methods19915.57%
▷ Public methods88669.33%
▷ Protected methods171.33%
▷ Private methods37529.34%
Functions101
▷ Named functions101100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/wc-place-order-without-payment.png7.50KB4.32KB▼ 42.41%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/wc-thanks-redirect.png6.32KB3.32KB▼ 47.43%
freemius/assets/img/wc-product-author.png19.73KB7.58KB▼ 61.59%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%