88% asap507-panama-shipping-api-integration

Code Review | ASAP 507 Panama Shipping

WordPress plugin ASAP 507 Panama Shipping scored 88% from 54 tests.

About plugin

  • Plugin page: asap507-panama-sh...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.6.2
  • WordPress version: 5.8.1
  • First release: Jun 23, 2020
  • Latest release: Mar 12, 2021
  • Number of updates: 6
  • Update frequency: every 44.3 days
  • Top authors: t0gokj88ziy2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 416 total downloads

Benchmarks

Plugin footprint Passed 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: ▲0.12MB] [CPU: ▼172.43ms] 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.96 ▲0.2442.11 ▲18.66
Dashboard /wp-admin3.19 ▲0.1348.18 ▲1.21
Posts /wp-admin/edit.php3.24 ▲0.1345.75 ▲0.27
Add New Post /wp-admin/post-new.php5.55 ▲0.1191.25 ▼690.78
Media Library /wp-admin/upload.php3.13 ▲0.1236.17 ▼0.40
ASAP Shipping /wp-admin/admin.php?page=wcrsprd-asap-settings3.1035.45

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: 4 new files
Database: no new tables, no new 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 /3,703 ▲10715.79 ▲0.2011.49 ▲1.9448.39 ▼6.16
Dashboard /wp-admin2,973 ▲435.91 ▼0.05153.01 ▼6.00120.68 ▲0.74
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0070.40 ▼0.3296.13 ▼2.28
Add New Post /wp-admin/post-new.php1,683 ▼018.80 ▲0.33376.04 ▼35.44120.24 ▲7.89
Media Library /wp-admin/upload.php1,810 ▼05.02 ▲0.02154.27 ▼10.79122.09 ▲0.18
ASAP Shipping /wp-admin/admin.php?page=wcrsprd-asap-settings1,3802.0860.4290.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/asap507-panama-shipping-api-integration/index.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > 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 language_attributes() in wp-content/plugins/asap507-panama-shipping-api-integration/emails/email-template.php:2

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
3 plugin tags: asap, envios, panama

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

The main PHP script in "ASAP 507 Panama Shipping" version 2.0.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,013 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32551201,013

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.32
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%
Functions15
▷ Named functions15100.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
No PNG files were detected