68% asap507-panama-shipping-api-integration

Code Review | ASAP 507 Panama Shipping

WordPress plugin ASAP 507 Panama Shipping scored68%from 54 tests.

About plugin

  • Plugin page: asap507-panama-sh...
  • Plugin version: 3.2.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Aug 10, 2023
  • Number of updates: 11
  • Update frequency: every 104.3 days
  • Top authors: t0gokj88ziy2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /942 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.74MB] [CPU: ▼55.19ms] Passed 4 tests

Analyzing server-side resources used by ASAP 507 Panama Shipping
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.216.02 ▼31.82
Dashboard /wp-admin2.27 ▼1.077.76 ▼53.21
Posts /wp-admin/edit.php2.27 ▼1.087.65 ▼40.22
Add New Post /wp-admin/post-new.php2.27 ▼3.617.02 ▼95.52
Media Library /wp-admin/upload.php2.27 ▼0.956.79 ▼29.10
ASAP Shipping /wp-admin/admin.php?page=wcrsprd-asap-settings2.276.44

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for ASAP 507 Panama Shipping
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.42 ▲0.071.70 ▲0.1743.49 ▲4.99
Dashboard /wp-admin2,197 ▲295.55 ▼0.0281.06 ▼14.6540.69 ▼2.92
Posts /wp-admin/edit.php2,099 ▼12.03 ▲0.0234.00 ▲0.0834.83 ▼3.36
Add New Post /wp-admin/post-new.php1,537 ▲1118.28 ▼4.85600.59 ▼68.5064.73 ▲5.99
Media Library /wp-admin/upload.php1,402 ▲84.16 ▼0.0296.29 ▼1.6941.94 ▼1.48
ASAP Shipping /wp-admin/admin.php?page=wcrsprd-asap-settings1,0511.6923.2733.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the asap-507-style-admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=wcrsprd-asap-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the asap-507-style-admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/admin.php?page=wcrsprd-asap-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the asap-507-style-admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/asap507-panama-shipping-api-integration/emails/email-template.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Config\\Config' not found in wp-content/plugins/asap507-panama-shipping-api-integration/src/widgets/widget_orders.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/asap507-panama-shipping-api-integration/emails/email-styles.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asap507-panama-shipping-api-integration/src/Orders.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: panama, asap, 507, envios

asap507-panama-shipping-api-integration/index.php 92% from 13 tests

The main PHP script in "ASAP 507 Panama Shipping" version 3.2.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("asap507-panama-shipping-api-integration.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,131 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7186901,126
CSS1035

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods342.86%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/banner-asap.png4.84KB2.07KB▼ 57.22%