89% woocommerce-freight-shipping

Code Review | WooCommerce Freight Center

WordPress plugin WooCommerce Freight Center scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-freig...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2015
  • Latest release: Jan 5, 2016
  • Number of updates: 7
  • Update frequency: every 38.6 days
  • Top authors: FreightCenter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,453 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.23ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Freight Center
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.59 ▼2.34
Dashboard /wp-admin3.32 ▲0.0252.03 ▲3.13
Posts /wp-admin/edit.php3.37 ▲0.0253.34 ▲0.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.39 ▼16.32
Media Library /wp-admin/upload.php3.24 ▲0.0135.69 ▼2.77

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Freight Center
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.371.91 ▼0.1343.54 ▼2.57
Dashboard /wp-admin2,198 ▲215.63 ▼0.0690.81 ▼1.0039.95 ▼1.71
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0739.04 ▲3.5941.07 ▲3.45
Add New Post /wp-admin/post-new.php1,526 ▼023.01 ▼0.05644.31 ▼22.4370.46 ▲24.96
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0895.38 ▼20.1741.62 ▼6.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: woocommerce, shipping, ecommerce, freight

woocommerce-freight-shipping/woocommerce-freight-shipping.php 92% from 13 tests

"WooCommerce Freight Center" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected1,826 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP107668181,796
JavaScript212330

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity34.00
▷ Minimum class complexity8.00
▷ Maximum class complexity70.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods60
▷ Static methods11.67%
▷ Public methods60100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.62MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png83.35KB25.92KB▼ 68.90%
assets/screenshot-3.png103.06KB32.07KB▼ 68.89%
assets/icon_256x256.png34.73KB12.90KB▼ 62.87%
assets/screenshot-1.png211.47KB69.39KB▼ 67.19%
assets/screenshot-2.png192.74KB63.35KB▼ 67.13%