83% fraktjakt-shipping-for-woocommerce

Code Review | Fraktjakt WooCommerce Shipping

WordPress plugin Fraktjakt WooCommerce Shipping scored83%from 54 tests.

About plugin

  • Plugin page: fraktjakt-shippin...
  • Plugin version: 2.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.2
  • WordPress version: 6.3.1
  • First release: Aug 3, 2015
  • Latest release: May 10, 2023
  • Number of updates: 110
  • Update frequency: every 28.9 days
  • Top authors: Fraktjakt (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /17,146 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▲1.06ms] Passed 4 tests

This is a short check of server-side resources used by Fraktjakt WooCommerce Shipping
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3243.23 ▲7.25
Dashboard /wp-admin3.65 ▲0.3155.15 ▲7.27
Posts /wp-admin/edit.php3.76 ▲0.3748.49 ▼0.65
Add New Post /wp-admin/post-new.php6.25 ▲0.3391.13 ▼5.56
Media Library /wp-admin/upload.php3.57 ▲0.3138.10 ▲3.20

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Fraktjakt WooCommerce Shipping
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲14114.00 ▼0.385.71 ▲3.7859.44 ▲20.21
Dashboard /wp-admin2,210 ▲305.81 ▲0.80101.27 ▼20.4643.18 ▼7.74
Posts /wp-admin/edit.php2,093 ▲42.05 ▼0.0034.47 ▼4.7734.53 ▼1.99
Add New Post /wp-admin/post-new.php1,518 ▼123.18 ▲0.28603.22 ▲5.2052.95 ▲4.94
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0597.93 ▼3.4944.89 ▲2.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | 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 take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/fraktjakt-shipping-for-woocommerce/fraktjakt-woocommerce-shipping.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/fraktjakt-shipping-for-woocommerce/fraktjakt-woocommerce-shipping.php:25
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/fraktjakt-shipping-for-woocommerce/fraktjakt-woocommerce-shipping.php on line 14
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/fraktjakt-shipping-for-woocommerce/fraktjakt-woocommerce-shipping.php on line 14

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 94% 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:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

fraktjakt-shipping-for-woocommerce/fraktjakt-woocommerce-shipping.php 85% from 13 tests

"Fraktjakt WooCommerce Shipping" version 2.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "3.2")
  • Main file name: The principal plugin file should be the same as the plugin slug ("fraktjakt-shipping-for-woocommerce.php" instead of "fraktjakt-woocommerce-shipping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,640 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12632351,284
PO File1114136324
CSS119029
JavaScript1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity123.00
▷ Minimum class complexity123.00
▷ Maximum class complexity123.00
Average method complexity18.40
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions2696.30%
▷ Anonymous functions13.70%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin