83% packages-configuration-for-woocommerce

Code Review | Packages Configuration for WooCommerce

WordPress plugin Packages Configuration for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: packages-configur...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 1, 2015
  • Latest release: Sep 25, 2016
  • Number of updates: 11
  • Update frequency: every 38.3 days
  • Top authors: judgej (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /3,939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.04ms] Passed 4 tests

Server-side resources used by Packages Configuration for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.73 ▼6.64
Dashboard /wp-admin3.31 ▲0.0051.13 ▲2.48
Posts /wp-admin/edit.php3.36 ▲0.0049.98 ▲3.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.76 ▼10.13
Media Library /wp-admin/upload.php3.23 ▲0.0033.04 ▲2.14

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Packages Configuration for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.191.73 ▼0.0937.78 ▼10.09
Dashboard /wp-admin2,206 ▲215.91 ▲0.05106.48 ▼12.1239.44 ▼7.53
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0739.63 ▲2.5134.74 ▲2.85
Add New Post /wp-admin/post-new.php1,533 ▲1423.27 ▲0.12593.34 ▼62.8150.22 ▼5.73
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.0699.06 ▲2.5542.15 ▼0.53

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Please fix the following
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/packages-configuration-for-woocommerce/views/shipping_class_method_restrictions.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/packages-configuration-for-woocommerce/multiple-packages-shipping.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/packages-configuration-for-woocommerce/1.2.5/multiple-packages-shipping.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/packages-configuration-for-woocommerce/views/admin_options.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/packages-configuration-for-woocommerce/1.2.5/classes/Academe_Multiple_Packages_Settings.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/packages-configuration-for-woocommerce/1.2.5/views/admin_options.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/packages-configuration-for-woocommerce/1.2.5/views/shipping_class_method_restrictions.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/packages-configuration-for-woocommerce/classes/Academe_Multiple_Packages_Settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === packages-configuration-for-woocommerce === )
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

packages-configuration-for-woocommerce/multiple-packages-shipping.php 92% from 13 tests

The entry point to "Packages Configuration for WooCommerce" version 1.2.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("packages-configuration-for-woocommerce.php" instead of "multiple-packages-shipping.php")

Code Analysis Passed 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
There were no executable files found in this plugin508 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5152238489
JSON10019

PHP code Passed 2 tests

This is a very shot review of 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.49
Average class complexity37.00
▷ Minimum class complexity9.00
▷ Maximum class complexity65.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods618.75%
▷ Public methods3093.75%
▷ Protected methods26.25%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png12.17KB5.78KB▼ 52.56%
1.2.5/assets/icon-128x128.png5.38KB2.93KB▼ 45.62%
assets/icon-128x128.png5.38KB2.93KB▼ 45.62%
1.2.5/assets/icon-256x256.png12.17KB5.78KB▼ 52.56%