78% paack-delivery

Code Review | Paack Delivery

WordPress plugin Paack Delivery scored 78% from 54 tests.

About plugin

  • Plugin page: paack-delivery
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.1.23+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2019
  • Latest release: Feb 26, 2019
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: paackadmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 513 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Paack Delivery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.64 ▼1.87
Dashboard /wp-admin3.33 ▲0.0243.77 ▼2.20
Posts /wp-admin/edit.php3.38 ▲0.0245.51 ▼2.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.54 ▼22.66
Media Library /wp-admin/upload.php3.25 ▲0.0234.43 ▼0.69

Server storage [IO: ▲0.10MB] [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: 12 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
widget_recent-comments
text_popup
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
paack_message_zip_code_error
paack_message_zip_code_success
is_store_valid

Browser metrics Passed 4 tests

An overview of browser requirements for Paack Delivery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.32 ▼1.324.85 ▲3.3341.68 ▲0.39
Dashboard /wp-admin2,222 ▲364.83 ▼0.13108.33 ▲2.1637.89 ▼3.47
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0135.76 ▼5.9536.07 ▼2.16
Add New Post /wp-admin/post-new.php1,546 ▲1323.46 ▲0.32636.00 ▲1.2553.19 ▲1.81
Media Library /wp-admin/upload.php1,404 ▲164.22 ▲0.00105.58 ▲10.0544.80 ▲2.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 10 options in the database
    • db_upgraded
    • paack_message_zip_code_success
    • is_store_valid
    • widget_recent-posts
    • theysaidso_admin_options
    • paack_message_zip_code_error
    • text_popup
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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)
Good news, no errors were detected

SRP 0% 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/paack-delivery/paack_delivery.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paack-delivery/checkout/checkout.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paack-delivery/admin/paack_delivery_menu.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: ecommerce, delivery, paack

paack-delivery/paack_delivery.php 92% from 13 tests

"Paack Delivery" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("paack-delivery.php" instead of "paack_delivery.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 plugin2,238 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34251681,515
CSS2426380
PHP55610308
Markdown118035

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods538.46%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png6.04KB3.14KB▼ 47.96%