10% woocommerce-apg-free-postcodestatecountry-shipping

Code Review | WC - APG Free Shipping

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

About plugin

  • Plugin page: woocommerce-apg-f...
  • Plugin version: 2.8.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Dec 11, 2013
  • Latest release: Jul 16, 2023
  • Number of updates: 126
  • Update frequency: every 27.8 days
  • Top authors: artprojectgroup (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /36,166 total downloads

Benchmarks

Plugin footprint 40% 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+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.49ms] 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.46 ▲0.0038.13 ▲2.91
Dashboard /wp-admin3.31 ▼0.0441.58 ▼17.41
Posts /wp-admin/edit.php3.36 ▲0.0045.61 ▲2.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0076.30 ▼9.35
Media Library /wp-admin/upload.php3.23 ▲0.0036.26 ▲1.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_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 /2,794 ▲3314.30 ▼0.061.86 ▲0.2043.81 ▲6.00
Dashboard /wp-admin2,189 ▲85.51 ▼0.2087.42 ▼13.4040.59 ▲2.37
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0641.12 ▲6.7834.21 ▼2.03
Add New Post /wp-admin/post-new.php1,534 ▲818.14 ▼4.89598.53 ▼77.2762.67 ▲6.57
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0192.71 ▼8.6040.07 ▼5.19

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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 Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocommerce-apg-free-postcodestatecountry-shipping/includes/cuadro-informacion.php:5
    • > 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 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

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.8.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:
  • 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")
  • Description: The description should be shorter than 140 characters (currently 633 characters long)

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 detected2,057 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP710281825
CSS21023668
Markdown11210287
SVG200270
JavaScript1007

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.68
Average class complexity113.00
▷ Minimum class complexity113.00
▷ Maximum class complexity113.00
Average method complexity8.47
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
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