78% product-attribute-global-order-and-visibility

Code Review | Product Attribute Global Order and Visibility

WordPress plugin Product Attribute Global Order and Visibility scored 78% from 54 tests.

About plugin

  • Plugin page: product-attribute...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 2, 2019
  • Latest release: Jul 2, 2019
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: vishalsolanki40 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 534 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.64ms] Passed 4 tests

This is a short check of server-side resources used by Product Attribute Global Order and Visibility
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.47 ▼0.14
Dashboard /wp-admin3.32 ▲0.0146.91 ▲1.07
Posts /wp-admin/edit.php3.37 ▲0.0145.05 ▼3.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.01 ▲14.24
Media Library /wp-admin/upload.php3.24 ▲0.0132.73 ▲0.23
Product Attribute Order /wp-admin/edit.php?post_type=product&page=product_attribute_order3.0130.08

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Product Attribute Global Order and Visibility: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▼713.21 ▼0.061.68 ▼0.1241.75 ▼0.27
Dashboard /wp-admin2,213 ▲104.85 ▼0.9496.13 ▲2.0742.04 ▲0.49
Posts /wp-admin/edit.php2,095 ▲91.98 ▼0.0435.82 ▲1.3531.79 ▼2.26
Add New Post /wp-admin/post-new.php1,532 ▲1318.25 ▼5.08592.33 ▼75.4948.21 ▼5.13
Media Library /wp-admin/upload.php1,386 ▼24.23 ▲0.0893.37 ▼14.4245.08 ▲0.12
Product Attribute Order /wp-admin/edit.php?post_type=product&page=product_attribute_order280.440.103.57

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/product-attribute-global-order-and-visibility/woo-attribute-global-order-visibility.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/product-attribute-global-order-and-visibility/inc/class.product-attribute-order.php:68

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=product&page=product_attribute_order
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=product_attribute_order - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% 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
6 plugin tags: product attribute order setting, product attribute visibility, product attribute order visibility, product attribute, product attribute dynamic...

product-attribute-global-order-and-visibility/woo-attribute-global-order-visibility.php 77% from 13 tests

The entry point to "Product Attribute Global Order and Visibility" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-attribute-global-order-and-visibility.php" instead of "woo-attribute-global-order-visibility.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin264 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33185264

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.50
▷ Minimum class complexity7.00
▷ Maximum class complexity12.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin