65% custom-my-account-for-woocommerce

Code Review | Custom My Account for Woocommerce

WordPress plugin Custom My Account for Woocommerce scored65%from 54 tests.

About plugin

  • Plugin page: custom-my-account...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 13, 2016
  • Latest release: Jun 12, 2022
  • Number of updates: 138
  • Update frequency: every 17.0 days
  • Top authors: phoeniixx (100%)

Code review

54 tests

User reviews

54 reviews

Install metrics

3,000+ active /119,132 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.18ms] Passed 4 tests

A check of server-side resources used by Custom My Account for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0433.85 ▼3.50
Dashboard /wp-admin3.36 ▲0.0543.17 ▼8.03
Posts /wp-admin/edit.php3.41 ▲0.0542.51 ▼0.63
Add New Post /wp-admin/post-new.php5.96 ▲0.0778.83 ▼16.56
Media Library /wp-admin/upload.php3.28 ▲0.0534.16 ▲1.24
Custom My Account /wp-admin/admin.php?page=phoe_myaccount_setting3.2926.17

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 15 new options
New WordPress options
phoen-endpoint-customer-logout
phoen-endpoint-orders
phoen-endpoint-edit-address
db_upgraded
widget_recent-comments
phoen-endpoint-dashboard
myaccount_general_setting
widget_theysaidso_widget
theysaidso_admin_options
phoen-endpoint-edit-account
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom My Account for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.38 ▼0.031.60 ▲0.0238.41 ▼4.49
Dashboard /wp-admin2,217 ▲375.59 ▼0.0382.84 ▼9.5278.32 ▲38.70
Posts /wp-admin/edit.php2,125 ▲252.03 ▲0.0238.64 ▲1.2832.46 ▼5.32
Add New Post /wp-admin/post-new.php1,559 ▲3323.14 ▲0.19719.31 ▲83.5349.72 ▼4.31
Media Library /wp-admin/upload.php1,428 ▲284.18 ▼0.0097.76 ▲0.4174.28 ▲30.80
Custom My Account /wp-admin/admin.php?page=phoe_myaccount_setting3,07911.33244.7734.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 15 options
    • phoen-endpoint-dashboard
    • db_upgraded
    • widget_theysaidso_widget
    • myaccount_general_setting
    • widget_recent-comments
    • phoen-endpoint-edit-account
    • phoen-endpoint-orders
    • phoen-endpoint
    • phoen-endpoint-edit-address
    • can_compress_scripts
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=phoe_myaccount_setting
    • > Notice in wp-content/plugins/custom-my-account-for-woocommerce/admin/endpoint_setting.php+190
    Undefined variable: custom_content_show

SRP 0% from 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
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php
    • > /wp-content/plugins/custom-my-account-for-woocommerce/admin/How-to-install.php
    • > /wp-content/plugins/custom-my-account-for-woocommerce/admin/support-tab.php
    • > /wp-content/plugins/custom-my-account-for-woocommerce/admin/Woocommerce-app.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 213
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 231
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 195
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 265
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 153
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 181
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 242
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 211
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 311
    • > PHP Warning
      Use of undefined constant PHOENCMAFWPLUGINURL - assumed 'PHOENCMAFWPLUGINURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-my-account-for-woocommerce/admin/premium-tab.php on line 288

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=phoe_myaccount_setting
    • > Network (severe)
    wp-content/plugins/custom-my-account-for-woocommerce//assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
You can look at the official readme.txt

custom-my-account-for-woocommerce/main.php 62% from 13 tests

This is the main PHP file of "Custom My Account for Woocommerce" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-my-account-for-woocommerce.php" instead of "main.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • 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
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 186 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "2.6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,937 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS345541,195
PHP9385711,066
SVG100640
JavaScript216336

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
36 PNG files occupy 0.50MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/App-2-3.png71.93KB23.52KB▼ 67.31%
assets/images/Icon-8.png5.96KB3.78KB▼ 36.71%
assets/images/add-icon.png0.13KB0.13KB▼ 1.48%
assets/images/logo-wp.png1.20KB0.57KB▼ 52.72%
assets/images/Icon-3.png4.05KB2.72KB▼ 32.83%