89% api2cart-live-shipping-4-woocommerce

Code Review | API2Cart Live Shipping 4 Woocommerce

WordPress plugin API2Cart Live Shipping 4 Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: api2cart-live-shi...
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2019
  • Latest release: Aug 12, 2023
  • Number of updates: 16
  • Update frequency: every 99.9 days
  • Top authors: api2cartdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.91ms] Passed 4 tests

This is a short check of server-side resources used by API2Cart Live Shipping 4 Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.00 ▲2.50
Dashboard /wp-admin3.31 ▲0.0045.37 ▼5.53
Posts /wp-admin/edit.php3.36 ▲0.0040.83 ▼7.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.36 ▼24.10
Media Library /wp-admin/upload.php3.23 ▲0.0034.96 ▲1.87

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for API2Cart Live Shipping 4 Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.284.60 ▲2.9640.12 ▲0.79
Dashboard /wp-admin2,209 ▲205.76 ▲0.8094.81 ▼12.8440.29 ▼3.37
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0635.07 ▼5.3132.51 ▼5.08
Add New Post /wp-admin/post-new.php1,533 ▲523.15 ▼0.10659.90 ▲30.0146.87 ▼20.84
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0497.28 ▲2.4241.49 ▼2.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: live shipping rates, woocommerce live shipping, woocommerce plugin

api2cart-live-shipping-4-woocommerce/api2cart-live-shipping-4-woocommerce.php 85% from 13 tests

"API2Cart Live Shipping 4 Woocommerce" version 1.4.2'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:
  • Domain Path: The domain path folder does not exist ("/lang")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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 detected679 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5169119679

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity23.67
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin