68% skynet-malaysia

Code Review | Skynet Malaysia

WordPress plugin Skynet Malaysia scored68%from 54 tests.

About plugin

  • Plugin page: skynet-malaysia
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2020
  • Latest release: Aug 10, 2023
  • Number of updates: 33
  • Update frequency: every 29.2 days
  • Top authors: skynetmalaysia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /812 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼10.10ms] Passed 4 tests

A check of server-side resources used by Skynet Malaysia
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.2540.12 ▼2.73
Dashboard /wp-admin3.81 ▲0.1752.25 ▼15.32
Posts /wp-admin/edit.php3.86 ▲0.1853.62 ▼3.47
Add New Post /wp-admin/post-new.php6.34 ▲0.2097.06 ▼18.86
Media Library /wp-admin/upload.php3.67 ▲0.1840.05 ▼2.63

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 28 new files
Database: 1 new table, 7 new options
New tables
wp_wc_skynet_printed_sticker
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
wc_skynet_db_version
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Skynet Malaysia
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲11713.83 ▼0.547.99 ▲6.0643.30 ▼0.90
Dashboard /wp-admin2,208 ▲285.64 ▼0.0594.46 ▲6.8443.09 ▲0.24
Posts /wp-admin/edit.php2,120 ▲202.04 ▼0.0243.65 ▲1.6139.36 ▲0.32
Add New Post /wp-admin/post-new.php1,542 ▲1617.62 ▼0.02667.51 ▲49.7356.21 ▼7.57
Media Library /wp-admin/upload.php1,416 ▲164.24 ▲0.02103.83 ▼2.5441.80 ▼5.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_wc_skynet_printed_sticker
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • wc_skynet_db_version
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/skynet-malaysia/admin/partials/skynet-admin-display.php
    • > /wp-content/plugins/skynet-malaysia/public/partials/skynet-public-display.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_order() in wp-content/plugins/skynet-malaysia/admin/partials/skynet-print-awb-meta-box.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function str_contains() in wp-content/plugins/skynet-malaysia/admin/partials/skynet-reprint-bulky-awb.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function str_contains() in wp-content/plugins/skynet-malaysia/admin/partials/skynet-print-bulky-awb.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/skynet-malaysia/includes/woocommerce/class-skynet-shipping.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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: shipping, skynet, woocommerce

skynet-malaysia/skynet-malaysia.php 85% from 13 tests

This is the main PHP file of "Skynet Malaysia" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected1,888 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP193097331,352
JavaScript212382536
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.20
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods56
▷ Static methods23.57%
▷ Public methods4987.50%
▷ Protected methods23.57%
▷ Private methods58.93%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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