10% im-woocommerce-my-account-widget

Code Review | IM WooCommerce My Account Widget

WordPress plugin IM WooCommerce My Account Widget scored 10% from 54 tests.

About plugin

  • Plugin page: im-woocommerce-my...
  • Plugin version: 0.4.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Oct 9, 2016
  • Latest release: Oct 26, 2016
  • Number of updates: 22
  • Update frequency: every 0.7 days
  • Top authors: fabione80 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,087 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/im-woocommerce-my-account-widget/im-woocommerce-my-account-widget.php+372
    Function create_function() is deprecated

Server metrics [RAM: ▼1.67MB] [CPU: ▼190.46ms] Passed 4 tests

A check of server-side resources used by IM WooCommerce My Account Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.96 ▼0.767.36 ▼14.54
Dashboard /wp-admin1.98 ▼1.088.49 ▼43.46
Posts /wp-admin/edit.php1.98 ▼1.136.84 ▼42.92
Add New Post /wp-admin/post-new.php1.98 ▼3.466.38 ▼651.41
Media Library /wp-admin/upload.php1.98 ▼1.034.99 ▼24.03

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
widget_imwoocommercemyaccountwidget

Browser metrics Passed 4 tests

Checking browser requirements for IM WooCommerce My Account Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲11115.94 ▲0.088.17 ▼2.7258.10 ▲4.56
Dashboard /wp-admin2,973 ▲396.02 ▲0.06141.08 ▼18.32113.80 ▼1.94
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0066.45 ▼3.7587.78 ▲3.09
Add New Post /wp-admin/post-new.php1,683 ▼018.74 ▲0.19381.05 ▼13.16105.42 ▼13.29
Media Library /wp-admin/upload.php1,807 ▼35.01 ▼0.03153.20 ▼4.14123.94 ▼5.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/im-woocommerce-my-account-widget/im-woocommerce-my-account-widget.php+372
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_imwoocommercemyaccountwidget

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)
Even though everything seems fine, this is not an exhaustive test

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/im-woocommerce-my-account-widget/im-woocommerce-my-account-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention: You can look at the official readme.txt

im-woocommerce-my-account-widget/im-woocommerce-my-account-widget.php Passed 13 tests

The main PHP script in "IM WooCommerce My Account Widget" version 0.4.0 is automatically included on every request by WordPress
43 characters long description:
Shows woocommerce account data in a widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin347 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17537347

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity87.00
▷ Minimum class complexity87.00
▷ Maximum class complexity87.00
Average method complexity22.50
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected