10% jne-shipping

Code Review | JNE Shipping

WordPress plugin JNE Shipping scored10%from 54 tests.

About plugin

  • Plugin page: jne-shipping
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Jun 14, 2012
  • Latest release: Jun 18, 2015
  • Number of updates: 21
  • Update frequency: every 52.4 days
  • Top authors: abu.azzam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /10,578 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

Server metrics [RAM: ▼1.83MB] [CPU: ▼55.48ms] Passed 4 tests

A check of server-side resources used by JNE Shipping
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.47 ▼41.40
Dashboard /wp-admin2.18 ▼1.136.70 ▼42.40
Posts /wp-admin/edit.php2.18 ▼1.186.07 ▼44.57
Add New Post /wp-admin/post-new.php2.18 ▼3.717.95 ▼93.54
Media Library /wp-admin/upload.php2.18 ▼1.057.27 ▼26.83
JNE Shipping /wp-admin/options-general.php?page=jne-shipping2.187.13

Server storage [IO: ▲0.17MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 24 new files
Database: 1 new table, 6 new options
New tables
wp_jne_shipping
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for JNE Shipping
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲15813.64 ▼0.949.65 ▲7.5843.49 ▼4.34
Dashboard /wp-admin2,216 ▲425.71 ▲0.15106.47 ▲20.8542.98 ▲3.53
Posts /wp-admin/edit.php2,128 ▲282.05 ▲0.0840.21 ▲3.3836.18 ▼2.83
Add New Post /wp-admin/post-new.php1,551 ▲2323.44 ▲0.32665.61 ▼39.7263.35 ▲2.30
Media Library /wp-admin/upload.php1,430 ▲364.39 ▲0.25107.45 ▲7.2546.04 ▼1.32
JNE Shipping /wp-admin/options-general.php?page=jne-shipping8712.2828.0328.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > 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 autocomplete_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_jne_shipping
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jne-shipping
    • > 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 autocomplete_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jne-shipping
    • > 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 jneshipp_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jne-shipping
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 autocomplete_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jne-shipping
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 jneshipp_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=jne-shipping
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jne-shipping
    • > Notice in wp-content/plugins/jne-shipping/wpe-jneshipping.php+409
    Undefined variable: _SESSION
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jne-shipping
    • > Notice in wp-content/plugins/jne-shipping/wpe-jneshipping.php+409
    Trying to access array offset on value of type null

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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/jne-shipping/display_edit_tarif.view.php
    • > /wp-content/plugins/jne-shipping/display_add_tarif.view.php
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jne-shipping/display_edit_tarif.view.php on line 23
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jne-shipping/display_edit_tarif.view.php on line 19
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/jne-shipping/display_edit_tarif.view.php on line 23
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jne-shipping/display_edit_tarif.view.php on line 37
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jne-shipping/display_edit_tarif.view.php on line 31
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/jne-shipping/display_edit_tarif.view.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/jne-shipping/donation.view.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/jne-shipping/donation.view.php:1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/jne-shipping/display_edit_tarif.view.php on line 19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jne-shipping/display_edit_tarif.view.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (screenshot-1.png Tampilan JNE Shipping pada form Checkout.), #2 (screenshot-4.png Tampilan preview import Tarif.)
You can take inspiration from this readme.txt

jne-shipping/wpe-jneshipping.php 92% from 13 tests

The entry point to "JNE Shipping" version 1.7 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("jne-shipping.php" instead of "wpe-jneshipping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,436 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5125265748
PHP811613643
CSS26045

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png25.60KB11.20KB▼ 56.25%
screenshot-2.png34.65KB12.68KB▼ 63.40%
jne-icon.png1.97KB1.23KB▼ 37.40%
js-css/images/icons-18-white.png0.89KB0.75KB▼ 15.97%
screenshot-3.png19.30KB8.71KB▼ 54.89%