90% woocommerce-correios

Code Review | Claudio Sanches - Correios for WooCommerce

WordPress plugin Claudio Sanches - Correios for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-correios
  • Plugin version: 4.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 1, 2012
  • Latest release: Nov 9, 2023
  • Number of updates: 122
  • Update frequency: every 33.3 days
  • Top authors: claudiosanches (100%)

Code review

54 tests

User reviews

849 reviews

Install metrics

50,000+ active /707,867 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.55ms] Passed 4 tests

This is a short check of server-side resources used by Claudio Sanches - Correios for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.05 ▼0.29
Dashboard /wp-admin3.34 ▼0.0143.77 ▼17.42
Posts /wp-admin/edit.php3.39 ▲0.0346.78 ▼0.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.03 ▼4.13
Media Library /wp-admin/upload.php3.26 ▲0.0336.96 ▲2.94

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Claudio Sanches - Correios for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5514.29 ▲0.011.59 ▼0.1036.32 ▼6.22
Dashboard /wp-admin2,207 ▲275.59 ▼0.0192.35 ▼8.2242.81 ▼1.01
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0540.19 ▲5.4435.84 ▼5.13
Add New Post /wp-admin/post-new.php1,538 ▲1223.06 ▼0.58675.73 ▼10.1279.78 ▲11.37
Media Library /wp-admin/upload.php1,406 ▲64.20 ▼0.01105.74 ▼2.5844.72 ▲0.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: woocommerce, shipping, delivery, correios

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

The main file in "Claudio Sanches - Correios for WooCommerce" v. 4.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin5,758 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP521,0022,8894,906
PO File1213411555
JavaScript84497295
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.21
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes39
▷ Abstract classes410.26%
▷ Concrete classes3589.74%
▷ Final classes00.00%
Methods278
▷ Static methods2810.07%
▷ Public methods20473.38%
▷ Protected methods6724.10%
▷ Private methods72.52%
Functions11
▷ Named functions11100.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