10% riaxe-product-customizer

Code Review | Riaxe Product Customizer

WordPress plugin Riaxe Product Customizer scored10%from 54 tests.

About plugin

  • Plugin page: riaxe-product-cus...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2023
  • Latest release: Aug 17, 2023
  • Number of updates: 9
  • Update frequency: every 21.8 days
  • Top authors: imprintnext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /342 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/riaxe-product-customizer/riaxe-product-designer.php+4767
    Uncaught Error: Call to undefined function wc_trim_string() in wp-content/plugins/riaxe-product-customizer/riaxe-product-designer.php:4767
    Stack trace:
    #0 wp-content/plugins/riaxe-product-customizer/riaxe-product-designer.php(4751): InkXEProductDesignerLite->generate_keys()
    #1 wp-includes/class-wp-hook.php(312): InkXEProductDesignerLite->ink_pd_activation_redirect()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲0.24MB] [CPU: ▼15.68ms] Passed 4 tests

A check of server-side resources used by Riaxe Product Customizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8733.81 ▼9.25
Dashboard /wp-admin4.25 ▲0.9046.81 ▼14.71
Posts /wp-admin/edit.php4.30 ▲0.9453.15 ▲6.25
Add New Post /wp-admin/post-new.php4.16 ▼1.7342.45 ▼45.01
Media Library /wp-admin/upload.php4.16 ▲0.9345.89 ▲8.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
wp_multipleshippingaddress
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Riaxe Product Customizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,481 ▼29013.20 ▼1.550.54 ▼1.7220.06 ▼25.12
Dashboard /wp-admin2,225 ▲374.91 ▼0.95109.13 ▼13.1884.75 ▲40.08
Posts /wp-admin/edit.php2,108 ▲221.99 ▼0.1640.94 ▲5.3036.78 ▼0.30
Add New Post /wp-admin/post-new.php1,683 ▲1622.11 ▼0.13750.37 ▲54.1861.92 ▲7.50
Media Library /wp-admin/upload.php1,407 ▲224.19 ▼0.0096.09 ▼8.9176.42 ▲32.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/riaxe-product-customizer/views/admin/imprint-setup.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/riaxe-product-customizer/riaxe-product-designer.php:154
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/riaxe-product-customizer/views/admin/imprint-dashboard.php:4

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: designer, woocommerce, customizer

riaxe-product-customizer/riaxe-product-designer.php 92% from 13 tests

"Riaxe Product Customizer" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("riaxe-product-customizer.php" instead of "riaxe-product-designer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected5,899 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP53131,2115,466
JavaScript38538286
CSS234147

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity722.00
▷ Minimum class complexity722.00
▷ Maximum class complexity722.00
Average method complexity5.74
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods141
▷ Static methods00.00%
▷ Public methods13797.16%
▷ Protected methods00.00%
▷ Private methods42.84%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/frontend/css/rs-minimal-white.png5.33KB2.51KB▼ 52.97%
assets/frontend/img/XE.png0.93KB0.93KB0.00%