68% staggs

Code Review | Staggs - Product configurator for WooCommerce

WordPress plugin Staggs - Product configurator for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: staggs
  • Plugin version: 1.5.5
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 29, 2022
  • Latest release: Oct 28, 2023
  • Number of updates: 53
  • Update frequency: every 8.1 days
  • Top authors: staggsofficial (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /2,705 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲5.37MB] [CPU: ▲34.36ms] 75% from 4 tests

Server-side resources used by Staggs - Product configurator for WooCommerce
The following require your attention
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.37MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /10.50 ▲7.04115.57 ▲78.73
Dashboard /wp-admin8.87 ▲5.5380.25 ▲24.93
Posts /wp-admin/edit.php8.87 ▲5.5276.82 ▲34.19
Add New Post /wp-admin/post-new.php10.66 ▲4.77133.32 ▲36.92
Media Library /wp-admin/upload.php8.87 ▲5.6475.98 ▲41.41
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.8766.02

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 838 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
fs_debug_mode
can_compress_scripts
widget_theysaidso_widget
fs_active_plugins
widget_recent-comments
db_upgraded
staggs_check_builder_type
widget_recent-posts
fs_accounts

Browser metrics Passed 4 tests

An overview of browser requirements for Staggs - Product configurator for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲8514.38 ▼0.241.73 ▲0.1032.94 ▼9.68
Dashboard /wp-admin2,240 ▲655.59 ▼0.0683.09 ▼14.0539.87 ▲0.02
Posts /wp-admin/edit.php2,149 ▲492.05 ▲0.0835.43 ▲0.2534.43 ▲1.56
Add New Post /wp-admin/post-new.php1,559 ▲3122.46 ▼0.59635.74 ▼58.4841.19 ▼13.13
Media Library /wp-admin/upload.php1,448 ▲484.27 ▼0.0697.88 ▼2.4542.37 ▼0.62
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1162.0923.4627.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/staggs/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • fs_accounts
    • fs_active_plugins
    • widget_recent-comments
    • staggs_check_builder_type
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • fs_debug_mode
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 129× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Meta_Datastore' not found in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/core/Datastore/Term_Meta_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/templates/Container/term_meta.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/core/Container/Condition/Blog_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/core/Container/Condition/Boolean_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/core/Container/Broken_Container.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/staggs/public/staggs-template-hooks.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Format_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/core/Field/Textarea_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu_Edit' not found in wp-content/plugins/staggs/vendor/htmlburger/carbon-fields/core/Walker/Nav_Menu_Item_Edit_Walker.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
5 plugin tags: product customizer, product configurator, product addons, 3d configurator, ar viewer

staggs/staggs.php Passed 13 tests

The entry point to "Staggs - Product configurator for WooCommerce" version 1.5.5 is a PHP file that has certain tags in its header comment area
131 characters long description:
Everything you need to build stunning product configurators in WordPress and WooCommerce. Boost sales and increase user engagement.

Code Analysis 97% from 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 detected87,690 lines of code in 685 files:
LanguageFilesBlank linesComment linesLines of code
PHP34312,70427,86559,589
JavaScript1857,94611,21820,100
CSS283111,1793,115
PO File288981,1112,411
Sass4936531,868
JSON400374
SVG4400149
Markdown324068
XML13016

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity30.81
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces24
Interfaces5
Traits0
Classes202
▷ Abstract classes136.44%
▷ Concrete classes18993.56%
▷ Final classes21.06%
Methods2,376
▷ Static methods35014.73%
▷ Public methods1,79875.67%
▷ Protected methods1827.66%
▷ Private methods39616.67%
Functions293
▷ Named functions21172.01%
▷ Anonymous functions8227.99%
Constants181
▷ Global constants10960.22%
▷ Class constants7239.78%
▷ Public constants72100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
49 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/arrow-bottom-left.png1.68KB0.41KB▼ 75.77%
public/css/images/ui-icons_555555_256x240.png6.96KB4.18KB▼ 39.91%
admin/img/staggs-acf.png11.86KB4.30KB▼ 63.75%
admin/img/steps.png1.11KB0.18KB▼ 84.09%
admin/img/1.png0.52KB0.31KB▼ 41.28%