73% pallet-packaging-for-woocommerce

Code Review | Pallet Packaging for WooCommerce

WordPress plugin Pallet Packaging for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: pallet-packaging-...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 6, 2021
  • Latest release: Sep 12, 2023
  • Number of updates: 18
  • Update frequency: every 42.7 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,074 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.51MB] [CPU: ▲2.53ms] Passed 4 tests

An overview of server-side resources used by Pallet Packaging for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5344.08 ▲1.63
Dashboard /wp-admin3.85 ▲0.5549.29 ▲1.06
Posts /wp-admin/edit.php3.90 ▲0.5452.20 ▲5.61
Add New Post /wp-admin/post-new.php6.39 ▲0.5095.54 ▲1.80
Media Library /wp-admin/upload.php3.71 ▲0.4844.05 ▲8.26

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: 1 new table, 7 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Pallet Packaging for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8513.25 ▼1.131.91 ▼0.0738.59 ▼3.66
Dashboard /wp-admin2,226 ▲345.13 ▲0.15114.84 ▲3.7243.50 ▲1.19
Posts /wp-admin/edit.php2,109 ▲172.07 ▲0.0740.52 ▲0.5333.59 ▼0.01
Add New Post /wp-admin/post-new.php1,540 ▲618.58 ▼4.58616.43 ▼43.6053.27 ▲9.38
Media Library /wp-admin/upload.php1,408 ▲174.29 ▲0.1395.67 ▼4.0641.83 ▼5.40

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
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_en_pallets
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • en_pallet_packaging_version
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pallet-packaging-for-woocommerce/adding-pallets/includes/pallets-per-product.php:20

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)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Add descriptions for screenshots #1, #2, #3 in pallet-packaging-for-woocommerce/assets to your readme.txt
You can take inspiration from this readme.txt

pallet-packaging-for-woocommerce/pallet-packaging-for-woocommerce.php 77% from 13 tests

The main PHP file in "Pallet Packaging for WooCommerce" ver. 1.1.7 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("6.2" instead of "6.4")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin3,627 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview 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.41
Average class complexity21.40
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
▷ Static methods99.78%
▷ Public methods92100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions10100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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
adding-pallets/assets/images/delete.png3.49KB0.86KB▼ 75.41%
adding-pallets/assets/images/edit.png3.09KB0.70KB▼ 77.43%