77% print-label-and-tracking-code-for-dpd

Code Review | Print Label and Tracking Code for DPD

WordPress plugin Print Label and Tracking Code for DPD scored77%from 54 tests.

About plugin

  • Plugin page: print-label-and-t...
  • Plugin version: 4.4.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 26, 2021
  • Latest release: Oct 20, 2023
  • Number of updates: 56
  • Update frequency: every 12.9 days
  • Top authors: krunoslavris (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,949 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.65ms] Passed 4 tests

This is a short check of server-side resources used by Print Label and Tracking Code for DPD
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.48 ▼3.03
Dashboard /wp-admin3.31 ▼0.0448.84 ▼11.51
Posts /wp-admin/edit.php3.36 ▲0.0046.58 ▼4.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.59 ▼11.96
Media Library /wp-admin/upload.php3.23 ▲0.0032.73 ▼0.96

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Print Label and Tracking Code for DPD
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.062.09 ▲0.2644.43 ▲2.03
Dashboard /wp-admin2,198 ▲245.65 ▲0.0784.44 ▼6.7137.35 ▲2.28
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0234.46 ▼0.2532.54 ▼0.24
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▼0.36679.72 ▼7.7453.10 ▲5.81
Media Library /wp-admin/upload.php1,403 ▲64.27 ▲0.0995.05 ▼17.7441.79 ▼5.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • activate_admin_dpd
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/print-label-and-tracking-code-for-dpd/admin/template/gopremium.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/print-label-and-tracking-code-for-dpd/admin/init.php:10
    • > PHP Notice
      Undefined variable: order in wp-content/plugins/print-label-and-tracking-code-for-dpd/admin/template/labelform.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_items() on null in wp-content/plugins/print-label-and-tracking-code-for-dpd/admin/template/labelform.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: shipping, package tracking, delivery plugin, print label, dpd

print-label-and-tracking-code-for-dpd/wp-dpd-print-label.php 77% from 13 tests

"Print Label and Tracking Code for DPD" version 4.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("print-label-and-tracking-code-for-dpd.php" instead of "wp-dpd-print-label.php")
  • Git Repository: An alternative Git repository was detected
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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,477 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP4225911,336
CSS13203199894
PO File14848129
HTML1341192
JavaScript112726

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity169.00
▷ Minimum class complexity169.00
▷ Maximum class complexity169.00
Average method complexity6.42
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods31
▷ Static methods31100.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
32 PNG files occupy 0.24MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_help/assets/images/settings.png39.17KB17.87KB▼ 54.37%
(invalid) _help/__MACOSX/assets/blueprint-css/plugins/link-icons/icons/._doc.png0.23KB0.00KB▼ 100.00%
_help/assets/blueprint-css/src/grid.png0.16KB0.10KB▼ 39.13%
(invalid) _help/__MACOSX/assets/images/._htmlstructure.png0.32KB0.00KB▼ 100.00%
(invalid) _help/__MACOSX/assets/blueprint-css/plugins/buttons/icons/._cross.png0.23KB0.00KB▼ 100.00%