84% portugal-chronopost-pickup-woocommerce

Code Review | Portugal DPD Pickup and Lockers network for WooCommerce

WordPress plugin Portugal DPD Pickup and Lockers network for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: portugal-chronopo...
  • Plugin version: 3.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 18, 2017
  • Latest release: Oct 20, 2023
  • Number of updates: 118
  • Update frequency: every 18.8 days
  • Top authors: webdados (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /7,630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼6.40ms] Passed 4 tests

This is a short check of server-side resources used by Portugal DPD Pickup and Lockers network for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2040.37 ▲0.77
Dashboard /wp-admin3.51 ▲0.2043.55 ▼6.50
Posts /wp-admin/edit.php3.62 ▲0.2647.29 ▼0.78
Add New Post /wp-admin/post-new.php6.09 ▲0.2078.55 ▼17.07
Media Library /wp-admin/upload.php3.43 ▲0.2035.88 ▼1.24

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Portugal DPD Pickup and Lockers network for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.081.69 ▲0.1642.64 ▼0.25
Dashboard /wp-admin2,192 ▲155.51 ▼0.0595.42 ▲7.5044.66 ▲0.69
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0435.66 ▼2.2934.25 ▼2.62
Add New Post /wp-admin/post-new.php1,531 ▲523.29 ▼0.67644.08 ▼18.8254.36 ▼1.64
Media Library /wp-admin/upload.php1,394 ▼34.23 ▲0.0692.92 ▼3.2540.69 ▼3.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/portugal-chronopost-pickup-woocommerce/portugal-chronopost-pickup-woocommerce.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

portugal-chronopost-pickup-woocommerce/portugal-chronopost-pickup-woocommerce.php 92% from 13 tests

The principal PHP file in "Portugal DPD Pickup and Lockers network for WooCommerce" v. 3.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 182 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,228 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4551121,123
CSS20053
JavaScript111552

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions4495.65%
▷ Anonymous functions24.35%
Constants2
▷ Global constants2100.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
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pro_nag/pro_pickup.png2.78KB2.62KB▼ 5.75%
assets/dpd_230_100.png2.28KB2.02KB▼ 11.36%
pro_nag/pro.png3.05KB2.86KB▼ 6.43%