84% expivi

Code Review | 3D Product configurator for WooCommerce

WordPress plugin 3D Product configurator for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: expivi
  • Plugin version: 2.8.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 26, 2018
  • Latest release: Nov 15, 2023
  • Number of updates: 182
  • Update frequency: every 10.4 days
  • Top authors: expivi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /12,508 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by 3D Product configurator for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.16 ▲1.42
Dashboard /wp-admin3.31 ▼0.0449.20 ▼14.92
Posts /wp-admin/edit.php3.36 ▲0.0047.69 ▲3.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.87 ▲2.50
Media Library /wp-admin/upload.php3.23 ▲0.0034.66 ▼2.76

Server storage [IO: ▲18.57MB] [DB: ▲0.31MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 656 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

3D Product configurator for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.18 ▼0.171.73 ▲0.0738.62 ▼6.11
Dashboard /wp-admin2,198 ▲285.62 ▲0.0191.70 ▼17.8641.40 ▲0.33
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0238.73 ▲2.7637.14 ▲2.39
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▲0.20592.26 ▼84.1654.76 ▼11.29
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.0294.15 ▼11.7241.41 ▼5.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 187× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/expivi/vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/expivi/vendor/sabberworm/php-css-parser/src/Property/Charset.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/expivi/vendor/guzzlehttp/promises/src/EachPromise.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSList' not found in wp-content/plugins/expivi/vendor/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\File' not found in wp-content/plugins/expivi/vendor/phenx/php-font-lib/src/FontLib/WOFF/File.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/expivi/vendor/dompdf/dompdf/src/FrameDecorator/TableRowGroup.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/expivi/vendor/phenx/php-svg-lib/src/Svg/Tag/Polyline.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/expivi/vendor/guzzlehttp/promises/src/TaskQueue.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' not found in wp-content/plugins/expivi/vendor/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php:10
    • > PHP Parse error
      syntax error, unexpected '|', expecting '{' in wp-content/plugins/expivi/vendor/symfony/polyfill-intl-idn/bootstrap80.php on line 121

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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: ar, visual product configurator, 3d visualisation, product configuration, augmented reality

expivi/expivi.php 92% from 13 tests

This is the main PHP file of "3D Product configurator for WooCommerce" version 2.8.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.3" instead of "4.5.0")

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin94,258 lines of code in 549 files:
LanguageFilesBlank linesComment linesLines of code
PHP47913,60730,26175,266
JavaScript122,4266928,143
Markdown281,82005,094
SVG2002,679
JSON20002,209
CSS39350395
PO File1169224385
YAML217566
HTML10017
Bourne Shell1104

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 651)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity25.16
▷ Minimum class complexity1.00
▷ Maximum class complexity809.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity651.00
Code structure
Namespaces56
Interfaces37
Traits7
Classes359
▷ Abstract classes174.74%
▷ Concrete classes34295.26%
▷ Final classes4513.16%
Methods3,457
▷ Static methods35010.12%
▷ Public methods2,89683.77%
▷ Protected methods2978.59%
▷ Private methods2647.64%
Functions234
▷ Named functions6829.06%
▷ Anonymous functions16670.94%
Constants469
▷ Global constants9019.19%
▷ Class constants37980.81%
▷ Public constants36897.10%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/translate.png1.09KB1.19KB0.00%
public/img/camera.png1.56KB1.63KB0.00%
public/img/company-logo-black.png23.37KB8.79KB▼ 62.40%
public/img/company-logo-white.png25.54KB9.16KB▼ 64.14%
vendor/dompdf/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%