77% wc-essential-addons

Code Review | Missing Addons for WooCommerce

WordPress plugin Missing Addons for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: wc-essential-addons
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Sep 15, 2020
  • Latest release: May 7, 2021
  • Number of updates: 26
  • Update frequency: every 9.0 days
  • Top authors: naminbd (80.77%)istiaqnirab (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,251 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼6.68ms] Passed 4 tests

Server-side resources used by Missing Addons for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2943.17 ▲0.85
Dashboard /wp-admin3.66 ▲0.3150.20 ▼13.54
Posts /wp-admin/edit.php3.71 ▲0.3549.29 ▼5.75
Add New Post /wp-admin/post-new.php6.20 ▲0.3197.81 ▼8.28
Media Library /wp-admin/upload.php3.52 ▲0.2943.30 ▲6.24
All Modules /wp-admin/admin.php?page=springdevs-modules3.4840.52
Active Pro /wp-admin/admin.php?page=springdevs-freemius3.4935.86

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 856 new files
Database: no new tables, 9 new options
New WordPress options
sdevs_wea_installed
can_compress_scripts
db_upgraded
widget_recent-comments
sdevs_wea_modules
widget_theysaidso_widget
theysaidso_admin_options
sdevs_wea_version
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Missing Addons for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14214.76 ▲0.582.04 ▲0.1243.12 ▲2.85
Dashboard /wp-admin2,303 ▲975.90 ▲0.99110.69 ▲7.0571.53 ▲30.23
Posts /wp-admin/edit.php2,189 ▲822.21 ▲0.1635.53 ▼5.7733.51 ▼1.20
Add New Post /wp-admin/post-new.php1,739 ▲20822.52 ▼0.72654.25 ▲47.3143.98 ▼11.00
Media Library /wp-admin/upload.php1,470 ▲704.22 ▼0.0197.59 ▼1.1270.34 ▲23.40
All Modules /wp-admin/admin.php?page=springdevs-modules1,0042.1124.2227.78
Active Pro /wp-admin/admin.php?page=springdevs-freemius1,0532.2528.9340.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • sdevs_wea_modules
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • sdevs_wea_installed
    • sdevs_wea_version
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 9× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/sabberworm/php-css-parser/tests/quickdump.php
    • > /wp-content/plugins/wc-essential-addons/modules/product-sharing-buttons/templates/3.php
    • > /wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/templates/simple/invoice/footer.php
    • > /wp-content/plugins/wc-essential-addons/modules/bulk-products-selling/includes/Admin/views/footer-script.php
    • > /wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/templates/simple/packing/footer.php
    • > /wp-content/plugins/wc-essential-addons/includes/Admin/views/pricing.php
    • > /wp-content/plugins/wc-essential-addons/modules/product-sharing-buttons/templates/2.php
    • > /wp-content/plugins/wc-essential-addons/modules/product-sharing-buttons/templates/1.php
    • > /wp-content/plugins/wc-essential-addons/modules/product-sharing-buttons/templates/4.php
  • 215× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/Block.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Table.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Property/AtRule.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Header' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/phenx/php-font-lib/src/FontLib/EOT/Header.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Parser\\Plugin' not found in wp-content/plugins/wc-essential-addons/vendor/raveren/kint/src/Parser/JsonPlugin.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/LineName.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Tests\\TestCase' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/dompdf/dompdf/tests/HelpersTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Frame' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Tests\\TestCase' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/dompdf/dompdf/tests/AutoloaderTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/wc-essential-addons/modules/pdf-invoices-and-packing-slips/vendor/phenx/php-font-lib/src/FontLib/Table/Type/post.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

wc-essential-addons/wc-essential-addons.php 85% from 13 tests

"Missing Addons for WooCommerce" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin127,205 lines of code in 675 files:
LanguageFilesBlank linesComment linesLines of code
PHP51811,47020,16876,461
JSON300045,188
Vuejs Component1823252,189
CSS59289811,565
Markdown1934901,100
JavaScript2031159253
Sass1310178
XML522176
YAML315270
HTML10017
SVG1008

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.02
▷ Minimum class complexity1.00
▷ Maximum class complexity797.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces90
Interfaces7
Traits11
Classes422
▷ Abstract classes153.55%
▷ Concrete classes40796.45%
▷ Final classes122.95%
Methods3,088
▷ Static methods2447.90%
▷ Public methods2,75989.35%
▷ Protected methods1956.31%
▷ Private methods1344.34%
Functions76
▷ Named functions4255.26%
▷ Anonymous functions3444.74%
Constants284
▷ Global constants7727.11%
▷ Class constants20772.89%
▷ Public constants207100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.27MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/Woo-Advanced-Coupon/icon.png4.56KB2.38KB▼ 47.80%
modules/pdf-invoices-and-packing-slips/vendor/dompdf/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%
assets/images/logo.png7.05KB3.41KB▼ 51.68%
modules/simple-subscription/assets/images/subscrpt-ads.png239.59KB250.28KB0.00%
modules/simple-booking/icon.png2.74KB1.87KB▼ 31.98%