79% product-features-for-woocommerce

Code Review | Product Features For WooCommerce

WordPress plugin Product Features For WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: product-features-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 21, 2018
  • Latest release: Jun 22, 2018
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: Brad Davis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /720 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.01MB] [CPU: ▼2.93ms] Passed 4 tests

This is a short check of server-side resources used by Product Features For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.48 ▲1.88
Dashboard /wp-admin3.31 ▲0.0148.94 ▼6.38
Posts /wp-admin/edit.php3.37 ▲0.0154.30 ▲1.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.27 ▼4.06
Media Library /wp-admin/upload.php3.24 ▲0.0137.19 ▼2.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Features For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.101.62 ▼0.1939.27 ▼2.71
Dashboard /wp-admin2,195 ▲185.58 ▼0.0790.70 ▼10.1840.72 ▼3.70
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0739.59 ▼2.1335.06 ▼3.20
Add New Post /wp-admin/post-new.php1,527 ▼123.07 ▼0.15653.15 ▼34.4850.18 ▼19.15
Media Library /wp-admin/upload.php1,397 ▼34.18 ▲0.08103.58 ▼10.4845.76 ▼0.76

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
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/product-features-for-woocommerce/uninstall.php+31
    Invalid argument supplied for foreach()
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

product-features-for-woocommerce/product-features-woocommerce.php 85% from 13 tests

The main PHP script in "Product Features For WooCommerce" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-features-for-woocommerce.php" instead of "product-features-woocommerce.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected499 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP790235367
CSS43422131
JavaScript1121

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.57
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.48MB with 0.33MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png160.72KB46.73KB▼ 70.93%
assets/screenshot-3.png100.65KB32.37KB▼ 67.84%
assets/screenshot-1.png114.24KB35.19KB▼ 69.20%
assets/screenshot-2.png114.96KB36.21KB▼ 68.50%