89% woocommerce-jne

Code Review | WooCommerce JNE Shipping

WordPress plugin WooCommerce JNE Shipping scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-jne
  • Plugin version: 8.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2015
  • Latest release: May 24, 2019
  • Number of updates: 60
  • Update frequency: every 36.4 days
  • Top authors: AgenWebsite (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

100+ active /46,397 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: ▼1.72ms] Passed 4 tests

An overview of server-side resources used by WooCommerce JNE Shipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.29 ▼6.27
Dashboard /wp-admin3.36 ▲0.0646.10 ▼3.32
Posts /wp-admin/edit.php3.47 ▲0.1247.72 ▲0.64
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.74 ▲2.06
Media Library /wp-admin/upload.php3.28 ▲0.0637.39 ▲2.23

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce JNE Shipping
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.161.74 ▼0.2842.24 ▼3.26
Dashboard /wp-admin2,209 ▲275.90 ▲1.04108.92 ▲2.8141.95 ▲2.58
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0540.07 ▼0.8734.87 ▼2.70
Add New Post /wp-admin/post-new.php1,533 ▼323.09 ▼0.11667.92 ▲76.9854.86 ▼3.37
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.0995.28 ▼3.7545.36 ▲2.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

woocommerce-jne/woocommerce-jne.php 92% from 13 tests

This is the main PHP file of "WooCommerce JNE Shipping" version 8.2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "3.0.0")

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 plugin3,052 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP94831,1222,125
Markdown21240456
JavaScript46421330
CSS2322140
Sass1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity46.86
▷ Minimum class complexity4.00
▷ Maximum class complexity163.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods148
▷ Static methods117.43%
▷ Public methods8658.11%
▷ Protected methods4329.05%
▷ Private methods1912.84%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants58
▷ Global constants23.45%
▷ Class constants5696.55%
▷ Public constants56100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/good.png0.52KB0.52KB0.00%
assets/images/upgrade-728x90.png63.73KB24.31KB▼ 61.86%
assets/images/help.png0.30KB0.32KB0.00%
assets/images/bad.png0.64KB0.72KB0.00%
assets/images/logo.png5.43KB3.12KB▼ 42.54%