89% advanced-product-author-for-woocommeerce

Code Review | Advanced Product Author For WooCommerce

WordPress plugin Advanced Product Author For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: advanced-product-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 2, 2022
  • Latest release: May 14, 2022
  • Number of updates: 9
  • Update frequency: every 4.9 days
  • Top authors: sahilmultani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.40ms] Passed 4 tests

Analyzing server-side resources used by Advanced Product Author For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.98 ▼2.46
Dashboard /wp-admin3.31 ▲0.0042.94 ▼9.47
Posts /wp-admin/edit.php3.36 ▲0.0048.88 ▲2.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.91 ▼2.76
Media Library /wp-admin/upload.php3.23 ▲0.0032.23 ▲1.11

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Product Author For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.29 ▼1.081.64 ▼0.4143.66 ▼3.05
Dashboard /wp-admin2,206 ▲185.86 ▲0.99107.20 ▼5.5938.44 ▼6.16
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0138.62 ▲1.1034.26 ▲0.54
Add New Post /wp-admin/post-new.php1,514 ▼2017.53 ▼5.73692.55 ▼25.1659.43 ▼11.36
Media Library /wp-admin/upload.php1,382 ▼04.18 ▼0.0895.20 ▼4.5840.94 ▼2.89

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

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 90% 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: You can take inspiration from this readme.txt

advanced-product-author-for-woocommeerce/advanced-product-author-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Advanced Product Author For WooCommerce" version 1.0.1
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-product-author-for-woocommeerce.php" instead of "advanced-product-author-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin805 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP764388455
PO File47285271
JavaScript29248
CSS22831

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity10.20
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
7 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/woo-icons.png1.25KB1.21KB▼ 3.21%
images/woo-icon.png0.99KB0.68KB▼ 31.14%
admin/images/help.png0.30KB0.32KB0.00%
images/banner-772x250.png34.10KB12.27KB▼ 64.03%
admin/images/chosen-sprite@2x.png0.72KB0.83KB0.00%