10% woocommerce-apg-free-postcodestatecountry-shipping

Code Review | WC - APG Free Shipping

WordPress plugin WC - APG Free Shipping scored 10% from 54 tests.

About plugin

  • Plugin page: woocommerce-apg-f...
  • Plugin version: 2.6.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 5.9.2
  • First release: Dec 11, 2013
  • Latest release: Mar 24, 2022
  • Number of updates: 112
  • Update frequency: every 27.0 days
  • Top authors: artprojectgroup (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active / 26,326 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-includes/functions.php+6570
    fopen(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.02MB] [CPU: ▼299.03ms] Passed 4 tests

This is a short check of server-side resources used by WC - APG Free Shipping
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0161.12 ▲7.67
Dashboard /wp-admin3.41 ▲0.0034.07 ▼1.11
Posts /wp-admin/edit.php3.64 ▲0.0040.33 ▼0.87
Add New Post /wp-admin/post-new.php6.89 ▼0.0893.76 ▼1,184.83
Media Library /wp-admin/upload.php3.29 ▼0.0125.69 ▼9.29

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WC - APG Free Shipping
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,804 ▲6015.93 ▲0.286.65 ▼0.852.23 ▲0.17
Dashboard /wp-admin2,895 ▲376.15 ▼0.03119.13 ▼15.25159.35 ▼0.64
Posts /wp-admin/edit.php2,688 ▼33.24 ▲0.0163.43 ▲0.26136.92 ▼6.36
Add New Post /wp-admin/post-new.php1,661 ▼11215.79 ▼5.91393.95 ▼52.49158.48 ▼12.71
Media Library /wp-admin/upload.php1,698 ▼05.55 ▲0.04132.97 ▼12.63182.09 ▼15.43

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/functions.php+6570
    fopen(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-apg-free-postcodestatecountry-shipping/includes/formulario.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-apg-free-postcodestatecountry-shipping/includes/formulario.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-apg-free-postcodestatecountry-shipping/includes/formulario.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocommerce-apg-free-postcodestatecountry-shipping/includes/cuadro-informacion.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt is a good inspiration

woocommerce-apg-free-postcodestatecountry-shipping/apg-free-shipping.php 85% from 13 tests

The main PHP file in "WC - APG Free Shipping" ver. 2.6.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 633 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-apg-free-postcodestatecountry-shipping.php" instead of "apg-free-shipping.php")

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 detected1,963 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP79874763
CSS21023670
SVG200270
Markdown11090255
JavaScript1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity103.00
▷ Minimum class complexity103.00
▷ Maximum class complexity103.00
Average method complexity8.85
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin