77% all-in-one-wc

Code Review | All In One For Woocommerce

WordPress plugin All In One For Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: all-in-one-wc
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4 or higher-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2020
  • Latest release: Feb 9, 2023
  • Number of updates: 22
  • Update frequency: every 40.1 days
  • Top authors: dipikaparmar2018 (95.45%)dipakparmar443 (9.09%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.49MB] [CPU: ▲1.05ms] Passed 4 tests

A check of server-side resources used by All In One For Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5243.80 ▲2.52
Dashboard /wp-admin3.83 ▲0.5251.51 ▲0.96
Posts /wp-admin/edit.php3.88 ▲0.5255.87 ▲4.82
Add New Post /wp-admin/post-new.php6.34 ▲0.4699.72 ▼3.83
Media Library /wp-admin/upload.php3.69 ▲0.4641.69 ▲4.53

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

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

Browser metrics Passed 4 tests

Checking browser requirements for All In One For Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.33 ▲0.061.74 ▼0.2541.56 ▲1.81
Dashboard /wp-admin2,206 ▲154.85 ▼0.23105.51 ▼3.8844.34 ▲1.12
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0039.90 ▲1.9935.95 ▲2.34
Add New Post /wp-admin/post-new.php1,542 ▲2818.17 ▲0.65638.97 ▼61.6755.87 ▲5.53
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.1096.91 ▼6.8142.54 ▼4.20

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

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

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
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/all-in-one-wc/includes/Modules/Invoice/templates/aiow_invoice.php
    • > /wp-content/plugins/all-in-one-wc/includes/Modules/Invoice/templates/custom_doc.php
    • > /wp-content/plugins/all-in-one-wc/vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
    • > /wp-content/plugins/all-in-one-wc/includes/Modules/Invoice/templates/aiow_credit_note.php
    • > /wp-content/plugins/all-in-one-wc/includes/Modules/Invoice/templates/aiow_packing_slip.php
    • > /wp-content/plugins/all-in-one-wc/includes/Modules/Invoice/templates/aiow_proforma_invoice.php
  • 117× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-in-one-wc/includes/Modules/custom-fields/shipping/order-custom-statuses.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\Tfpdf\\FpdfTpl' not found in wp-content/plugins/all-in-one-wc/vendor/setasign/fpdi/src/Tfpdf/Fpdi.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'AIOW\\Modules\\Register_Modules' not found in wp-content/plugins/all-in-one-wc/includes/Modules/Shipping/Custom_Order_Statuses.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/all-in-one-wc/vendor/setasign/fpdi/src/PdfParser/Type/PdfName.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\PdfParserException' not found in wp-content/plugins/all-in-one-wc/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReferenceException.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'AIOW\\Modules\\Invoice\\Generate\\Invoice' not found in wp-content/plugins/all-in-one-wc/includes/Modules/Invoice/Generate/PDF.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function aiow_option() in wp-content/plugins/all-in-one-wc/includes/Modules/custom-fields/shipping/shipping-by-condition.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AIOW\\Modules\\Register_Modules' not found in wp-content/plugins/all-in-one-wc/includes/Modules/Invoice/Sub_Modules/Page.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'AIOW\\Modules\\Register_Modules' not found in wp-content/plugins/all-in-one-wc/includes/Modules/Shipping/Order_Numbers.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/all-in-one-wc/vendor/setasign/fpdi/src/PdfParser/Type/PdfNull.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce, add to cart woocommerce, all in one for woocommerce, addtocart

all-in-one-wc/all-in-one-woocommerce.php 77% from 13 tests

The primary PHP file in "All In One For Woocommerce" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "4 or higher")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("all-in-one-wc.php" instead of "all-in-one-woocommerce.php")

Code Analysis 95% 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 plugin65,030 lines of code in 215 files:
LanguageFilesBlank linesComment linesLines of code
PHP2013,58718,39464,387
JSON400245
Markdown3490171
CSS412170
JavaScript38357

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 4,379)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity68.88
▷ Minimum class complexity1.00
▷ Maximum class complexity4,379.00
Average method complexity7.21
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces24
Interfaces2
Traits2
Classes126
▷ Abstract classes53.97%
▷ Concrete classes12196.03%
▷ Final classes00.00%
Methods1,430
▷ Static methods15310.70%
▷ Public methods1,10677.34%
▷ Protected methods31822.24%
▷ Private methods60.42%
Functions110
▷ Named functions9990.00%
▷ Anonymous functions1110.00%
Constants189
▷ Global constants15280.42%
▷ Class constants3719.58%
▷ Public constants37100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
255 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/flag-icons/tj.png0.48KB0.58KB0.00%
assets/images/flag-icons/as.png0.63KB0.73KB0.00%
assets/images/flag-icons/um.png0.56KB0.63KB0.00%
assets/images/flag-icons/hk.png0.51KB0.65KB0.00%
assets/images/flag-icons/bt.png0.62KB0.70KB0.00%