83% gou-wc-account-tabs

Code Review | Gou Manage My Account Menu - User Roles

WordPress plugin Gou Manage My Account Menu - User Roles scored83%from 54 tests.

About plugin

  • Plugin page: gou-wc-account-tabs
  • Plugin version: 1.0.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: Oct 22, 2023
  • Number of updates: 123
  • Update frequency: every 6.7 days
  • Top authors: aslamkhangouran (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,643 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.17MB] [CPU: ▼3.73ms] Passed 4 tests

Analyzing server-side resources used by Gou Manage My Account Menu - User Roles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1837.46 ▼4.00
Dashboard /wp-admin3.47 ▲0.1745.90 ▼5.41
Posts /wp-admin/edit.php3.59 ▲0.2350.14 ▲0.39
Add New Post /wp-admin/post-new.php6.06 ▲0.1785.95 ▼5.89
Media Library /wp-admin/upload.php3.40 ▲0.1735.85 ▲1.16

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Gou Manage My Account Menu - User Roles
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.371.67 ▼0.0542.83 ▼3.25
Dashboard /wp-admin2,189 ▲125.50 ▼0.1683.64 ▼17.1138.04 ▼6.16
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0134.55 ▼4.7732.43 ▼1.11
Add New Post /wp-admin/post-new.php1,526 ▼923.03 ▲4.86654.76 ▲8.3366.07 ▲0.00
Media Library /wp-admin/upload.php1,400 ▲64.19 ▼0.04100.29 ▲2.6642.79 ▲2.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means 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
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/gou-wc-account-tabs/admin/gou-woo-need-help-popup.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gou-wc-account-tabs/gou-woo-account-tabs.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/gou-wc-account-tabs/admin/gou-woo-account-tab-settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gou-wc-account-tabs/admin/gou-woo-general-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gou-wc-account-tabs/admin/gou-woo-layout-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gou-wc-account-tabs/admin/gou-woo-menus-settings.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (29 tag instead of maximum 10)
You can take inspiration from this readme.txt

gou-wc-account-tabs/gou-woo-account-tabs.php 77% from 13 tests

Analyzing the main PHP file in "Gou Manage My Account Menu - User Roles" version 1.0.1.6
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 238 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("gou-wc-account-tabs.php" instead of "gou-woo-account-tabs.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,259 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10910731,990
JavaScript3319901,006
CSS27145263

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity142.00
▷ Minimum class complexity142.00
▷ Maximum class complexity142.00
Average method complexity5.70
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/x.png1.17KB1.10KB▼ 5.84%
admin/images/chosen-sprite.png0.53KB0.88KB0.00%
images/x.png1.17KB1.10KB▼ 5.84%