10% glasses-for-woocommerce

Code Review | ChatGPT Open AI Images & Content for WooCommerce

WordPress plugin ChatGPT Open AI Images & Content for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: glasses-for-wooco...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2022
  • Latest release: Apr 26, 2023
  • Number of updates: 37
  • Update frequency: every 8.7 days
  • Top authors: mauriciourrego (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /698 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > User error in wp-content/plugins/glasses-for-woocommerce/src/Schema.php+34
    Please enable WooCommerce Plugin before using Glasses for WooCommerce.

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

A check of server-side resources used by ChatGPT Open AI Images & Content for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.38 ▲0.91
Dashboard /wp-admin3.31 ▼0.0443.31 ▼12.21
Posts /wp-admin/edit.php3.36 ▲0.0045.97 ▼0.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.48 ▼7.70
Media Library /wp-admin/upload.php3.23 ▲0.0033.09 ▲0.60

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 193 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ChatGPT Open AI Images & Content for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.37 ▼0.251.85 ▲0.1646.00 ▼5.31
Dashboard /wp-admin2,195 ▲185.58 ▼0.0783.19 ▼7.5439.39 ▼0.26
Posts /wp-admin/edit.php2,103 ▲32.04 ▲0.0136.22 ▲0.6634.21 ▼7.78
Add New Post /wp-admin/post-new.php1,534 ▲818.25 ▼4.79648.31 ▼13.3962.20 ▲8.89
Media Library /wp-admin/upload.php1,397 ▼64.18 ▲0.0193.93 ▼1.1643.55 ▲0.70

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/data/convert-colors.php
  • 119× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include(): Failed opening '../../vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/tests/pragmatic/schemes.php on line 17
    • > PHP Fatal error
      Uncaught Error: Interface 'Phim\\Color\\LabColorInterface' not found in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/src/Phim/Color/LabColor.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Phim\\Shape\\GeometricShapeInterface' not found in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/src/Phim/Shape/GeometricShapeBase.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Phim\\Brush\\ColoredBrushInterface' not found in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/src/Phim/Brush/StrokeBrushInterface.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Phim\\Color\\HslColor' not found in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/tests/pragmatic/color-spaces.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Phim\\FormatInterface' not found in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/src/Phim/Format/SvgFormat.php:7
    • > PHP Warning
      include(../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/tests/pragmatic/palettes.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Phim\\Color\\HsColorBase' not found in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/src/Phim/Color/HsvColor.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Phim\\Color\\HsColorBase' not found in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/src/Phim/Color/HslColor.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Phim\\TransformationInterface' not found in wp-content/plugins/glasses-for-woocommerce/vendor/talesoft/phim/src/Phim/Transformation.php:16

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 97% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Requires php: Invalid plugin version format
The official readme.txt is a good inspiration

glasses-for-woocommerce/glasses-for-woocommerce.php Passed 13 tests

The entry point to "ChatGPT Open AI Images & Content for WooCommerce" version 2.2.0 is a PHP file that has certain tags in its header comment area
118 characters long description:
AI assisted store creation. Ever wanted a robot to open an e-commerce shop for you? This is what that would look like.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected8,622 lines of code in 184 files:
LanguageFilesBlank linesComment linesLines of code
PHP1702,0971,6937,425
Markdown62230516
CSS1660399
JSON400227
JavaScript13035
YAML16012
XML1008

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.92
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces23
Interfaces42
Traits32
Classes75
▷ Abstract classes45.33%
▷ Concrete classes7194.67%
▷ Final classes00.00%
Methods634
▷ Static methods10416.40%
▷ Public methods60395.11%
▷ Protected methods142.21%
▷ Private methods172.68%
Functions74
▷ Named functions4966.22%
▷ Anonymous functions2533.78%
Constants602
▷ Global constants10.17%
▷ Class constants60199.83%
▷ Public constants59799.33%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin