83% lagersystem-dk-parcelpickup-locator-for-woocommerce

Code Review | Lagersystem.dk: Parcelpickup locator for Woocommerce

WordPress plugin Lagersystem.dk: Parcelpickup locator for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: lagersystem-dk-pa...
  • Plugin version: 2.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 20, 2020
  • Latest release: Feb 22, 2023
  • Number of updates: 27
  • Update frequency: every 35.2 days
  • Top authors: lagersystem (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,475 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Lagersystem.dk: Parcelpickup locator for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0525.24 ▼15.61
Dashboard /wp-admin3.35 ▲0.0548.88 ▼6.93
Posts /wp-admin/edit.php3.40 ▲0.0544.29 ▼5.51
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.34 ▼2.85
Media Library /wp-admin/upload.php3.28 ▲0.0535.03 ▲5.66
LS Parcelpickup /wp-admin/options-general.php?page=lagersysten-parcelpickup-admin-page3.2542.38

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lagersystem.dk: Parcelpickup locator for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,473 ▼27314.83 ▲0.620.52 ▼1.2215.99 ▼28.70
Dashboard /wp-admin2,217 ▲295.85 ▲0.9595.63 ▼21.5642.71 ▼3.69
Posts /wp-admin/edit.php2,094 ▲52.03 ▲0.0433.67 ▼2.1732.99 ▼1.73
Add New Post /wp-admin/post-new.php1,521 ▲723.30 ▲5.77669.54 ▼0.3571.51 ▲16.19
Media Library /wp-admin/upload.php1,396 ▲174.25 ▲0.08111.62 ▲14.2747.68 ▲1.11
LS Parcelpickup /wp-admin/options-general.php?page=lagersysten-parcelpickup-admin-page9272.0728.3439.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lagersystem-dk-parcelpickup-locator-for-woocommerce/admin/partials/lagersystem-parcelpickup-woocommerce-admin-display.php

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === lagersystem-dk-parcelpickup-locator-for-woocommerce === )
Please take inspiration from this readme.txt

lagersystem-dk-parcelpickup-locator-for-woocommerce/lagersystem-parcelpickup-woocommerce.php 77% from 13 tests

Analyzing the main PHP file in "Lagersystem.dk: Parcelpickup locator for Woocommerce" version 2.0.10
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 227 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("lagersystem-dk-parcelpickup-locator-for-woocommerce.php" instead of "lagersystem-parcelpickup-woocommerce.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected2,000 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS38317694
PHP12211588693
JavaScript47940493
HTML13060
YAML22038
XML30022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods58
▷ Static methods23.45%
▷ Public methods5289.66%
▷ Protected methods00.00%
▷ Private methods610.34%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/house.png0.57KB0.53KB▼ 7.85%