66% pakke

Code Review | Pakke Envíos

WordPress plugin Pakke Envíos scored 66% from 54 tests.

About plugin

  • Plugin page: pakke
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Nov 16, 2021
  • Latest release: Jul 8, 2022
  • Number of updates: 10
  • Update frequency: every 23.4 days
  • Top authors: cwadev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 839 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼10.93ms] Passed 4 tests

An overview of server-side resources used by Pakke Envíos
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.52 ▼4.51
Dashboard /wp-admin3.36 ▲0.0550.34 ▲1.91
Posts /wp-admin/edit.php3.47 ▲0.1145.08 ▼14.79
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.78 ▼26.33
Media Library /wp-admin/upload.php3.28 ▲0.0538.36 ▲3.15
Pakke /wp-admin/options-general.php?page=pakke3.2933.81

Server storage [IO: ▲1.98MB] [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: 73 new files
Database: 2 new tables, 6 new options
New tables
wp_guia
wp_guiasxorden
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Pakke Envíos
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲21714.22 ▼0.164.76 ▲2.8138.11 ▼14.27
Dashboard /wp-admin2,235 ▲505.46 ▼0.36114.56 ▲8.2085.13 ▲44.98
Posts /wp-admin/edit.php2,139 ▲472.46 ▲0.4450.16 ▲11.4827.62 ▼8.65
Add New Post /wp-admin/post-new.php1,708 ▲18023.77 ▲5.55668.85 ▲36.4526.79 ▼24.21
Media Library /wp-admin/upload.php1,500 ▲1124.93 ▲0.73112.61 ▲7.0943.18 ▼1.01
Pakke /wp-admin/options-general.php?page=pakke2,4232.3051.9725.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pakke
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/pakke/admin/class-pakke-admin.php+164
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pakke/public/partials/pakke-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/pakke/admin/partials/pakke-admin-display.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pakke
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=pakke 0:0 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
Please take inspiration from this readme.txt

pakke/pakke.php Passed 13 tests

The principal PHP file in "Pakke Envíos" v. 1.0.2 is loaded by WordPress automatically on each request
17 characters long description:
Envios con Pakke.

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
Everything looks great! No dangerous files found in this plugin20,423 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,7524711,953
JavaScript52,1027,0696,813
PHP134466981,526
SVG74191
JSON20040

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.33
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods62
▷ Static methods69.68%
▷ Public methods5791.94%
▷ Protected methods00.00%
▷ Private methods58.06%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
26 PNG files occupy 0.55MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/docs/proceso-compra-img3.png10.14KB4.63KB▼ 54.40%
admin/img/docs/guias-img1.png26.51KB9.83KB▼ 62.92%
admin/img/docs/ajustes-woo-img4.png39.07KB15.07KB▼ 61.44%
admin/img/docs/ajustes-img10.png38.32KB14.65KB▼ 61.76%
admin/img/docs/proceso-compra2-img2.png16.75KB7.34KB▼ 56.20%