68% wpappsdev-pcbuilder

Code Review | WPAppsDev - WooCommerce PcBuilder Toolkit

WordPress plugin WPAppsDev - WooCommerce PcBuilder Toolkit scored68%from 54 tests.

About plugin

  • Plugin page: wpappsdev-pcbuilder
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 1, 2021
  • Latest release: Aug 29, 2022
  • Number of updates: 6
  • Update frequency: every 56.5 days
  • Top authors: saifulananda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,386 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.01ms] Passed 4 tests

Server-side resources used by WPAppsDev - WooCommerce PcBuilder Toolkit
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1443.76 ▲0.89
Dashboard /wp-admin3.44 ▲0.1448.36 ▼0.37
Posts /wp-admin/edit.php3.55 ▲0.2048.88 ▲0.50
Add New Post /wp-admin/post-new.php6.02 ▲0.1483.31 ▼13.04
Media Library /wp-admin/upload.php3.36 ▲0.1436.32 ▲2.04

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 91 new files
Database: 1 new table, 10 new options
New tables
wp_wpadpcbu_saved_pc
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
wpadpcbu_pages_created
wpadpcbu_installed
widget_theysaidso_widget
page_settings
wpadpcbu_version

Browser metrics Passed 4 tests

A check of browser resources used by WPAppsDev - WooCommerce PcBuilder Toolkit
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1414.31 ▼0.251.74 ▼0.2644.45 ▲5.91
Dashboard /wp-admin2,203 ▲235.53 ▼0.1182.28 ▼2.3440.93 ▼2.27
Posts /wp-admin/edit.php2,112 ▲122.11 ▲0.1334.82 ▲0.1430.72 ▼4.74
Add New Post /wp-admin/post-new.php1,537 ▲923.55 ▲0.43688.88 ▲4.7455.18 ▲3.76
Media Library /wp-admin/upload.php1,414 ▲144.17 ▲0.0195.91 ▲1.8146.65 ▲4.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wpadpcbu_saved_pc
  • The uninstall procedure has failed, leaving 10 options in the database
    • wpadpcbu_installed
    • can_compress_scripts
    • db_upgraded
    • wpadpcbu_version
    • widget_recent-comments
    • wpadpcbu_pages_created
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • page_settings

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 no errors were found, this is by no means 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpappsdev-pcbuilder/templates/shortcodes/pc-builder-search.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wpappsdev-pcbuilder/templates/shortcodes/pc-builder-product.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wpappsdev-pcbuilder/templates/shortcodes/pc-builder.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wpappsdev-pcbuilder/templates/admin/category-edit-form.php:2
    • > PHP Notice
      Undefined variable: products in wp-content/plugins/wpappsdev-pcbuilder/templates/shortcodes/pc-builder-product.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpappsdev-pcbuilder/templates/admin/admin-notice.php:2
    • > PHP Fatal error
      Trait 'WPAppsDev\\PCBU\\Traits\\Singleton' not found in wp-content/plugins/wpappsdev-pcbuilder/includes/Frontend/CustomerDashboard.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WPAppsDev\\PCBU\\Abstracts\\WPAppsDevShortcode' not found in wp-content/plugins/wpappsdev-pcbuilder/includes/Shortcodes/PcBuilders.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wpappsdev-pcbuilder/templates/admin/category-add-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/wpappsdev-pcbuilder/templates/admin/product-metabox.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WPAppsDev\\PCBU\\Abstracts\\WPAppsDevShortcode' not found in wp-content/plugins/wpappsdev-pcbuilder/includes/Shortcodes/PcBuildersSearch.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: computer builder, computer component, woocommerce pc builder, pc builder

wpappsdev-pcbuilder/wpappsdev-pcbuilder.php Passed 13 tests

This is the main PHP file of "WPAppsDev - WooCommerce PcBuilder Toolkit" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
64 characters long description:
Complete PC Components Selling Solution Toolkit for WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected5,349 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP689761,9394,427
CSS83964699
JavaScript86967219
JSON1004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.27
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces10
Interfaces0
Traits1
Classes29
▷ Abstract classes26.90%
▷ Concrete classes2793.10%
▷ Final classes13.70%
Methods218
▷ Static methods3817.43%
▷ Public methods21598.62%
▷ Protected methods00.00%
▷ Private methods31.38%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/WPAppsDev/assets/images/image.png2.74KB0.10KB▼ 96.43%
vendor/WPAppsDev/assets/images/chosen-sprite.png0.55KB0.70KB0.00%
vendor/WPAppsDev/assets/images/sprite.png6.06KB2.18KB▼ 64.10%