84% show-descriptions-for-woocommerce

Code Review | Show descriptions for WooCommerce

WordPress plugin Show descriptions for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: show-descriptions...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Apr 15, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: nomadjimbob (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /336 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Show descriptions for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.79 ▼4.12
Dashboard /wp-admin3.31 ▲0.0147.09 ▼6.80
Posts /wp-admin/edit.php3.36 ▲0.0046.32 ▼2.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.20 ▼22.37
Media Library /wp-admin/upload.php3.23 ▲0.0033.32 ▼4.54

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

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

Browser metrics Passed 4 tests

Show descriptions for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.211.83 ▲0.1245.57 ▲2.63
Dashboard /wp-admin2,198 ▲215.62 ▲0.0888.18 ▼7.2245.71 ▲4.84
Posts /wp-admin/edit.php2,100 ▲32.02 ▼0.0035.84 ▼2.8334.23 ▼5.42
Add New Post /wp-admin/post-new.php1,526 ▼021.03 ▼2.69659.41 ▼4.7056.09 ▼2.40
Media Library /wp-admin/upload.php1,397 ▼64.21 ▲0.0098.71 ▼5.9643.23 ▼0.27

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-descriptions-for-woocommerce/show-descriptions-woocommerce.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
1 plugin tags: woocommerce

show-descriptions-for-woocommerce/show-descriptions-woocommerce.php 92% from 13 tests

"Show descriptions for WooCommerce" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("show-descriptions-for-woocommerce.php" instead of "show-descriptions-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13135

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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
There are no PNG files in this plugin