83% woo-correos-de-costa-rica-shipping

Code Review | Correos de Costa Rica Shipping Plugin

WordPress plugin Correos de Costa Rica Shipping Plugin scored83%from 54 tests.

About plugin

  • Plugin page: woo-correos-de-co...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2019
  • Latest release: Jul 29, 2020
  • Number of updates: 9
  • Update frequency: every 36.4 days
  • Top authors: msanchez92 (66.67%)alarez (44.44%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,474 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▼2.14ms] Passed 4 tests

This is a short check of server-side resources used by Correos de Costa Rica Shipping Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2444.90 ▼0.16
Dashboard /wp-admin3.54 ▲0.2053.71 ▼15.63
Posts /wp-admin/edit.php3.65 ▲0.3053.19 ▲4.19
Add New Post /wp-admin/post-new.php6.12 ▲0.2495.40 ▲4.65
Media Library /wp-admin/upload.php3.46 ▲0.2440.08 ▲3.04

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Correos de Costa Rica Shipping Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.18 ▼1.051.91 ▲0.0743.08 ▼0.63
Dashboard /wp-admin2,226 ▲385.90 ▲0.0098.98 ▼11.9841.82 ▲0.43
Posts /wp-admin/edit.php2,112 ▲202.01 ▼0.0142.67 ▲3.0737.31 ▲3.41
Add New Post /wp-admin/post-new.php1,548 ▲1518.29 ▼4.95624.28 ▼79.6956.05 ▼3.87
Media Library /wp-admin/upload.php1,408 ▲234.18 ▼0.03101.67 ▼10.2145.48 ▼5.43

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-correos-de-costa-rica-shipping/includes/functions/pdevs-ccr-dependencies-alert-inactive-wc.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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
4 plugin tags: correos de costa rica, woocommerce, shipping, ecommerce

woo-correos-de-costa-rica-shipping/pdevs-ccr-web-service-woocommerce.php 77% from 13 tests

The principal PHP file in "Correos de Costa Rica Shipping Plugin" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-correos-de-costa-rica-shipping.php" instead of "pdevs-ccr-web-service-woocommerce.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.1" instead of "2.2")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,509 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51914031,450
CSS10059

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity27.25
▷ Minimum class complexity8.00
▷ Maximum class complexity44.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods60
▷ Static methods11.67%
▷ Public methods5693.33%
▷ Protected methods00.00%
▷ Private methods46.67%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-pdevs.png84.38KB9.71KB▼ 88.50%
assets/images/icon-ccr.png0.62KB0.43KB▼ 31.19%
assets/images/logo-pdevs.png19.95KB5.26KB▼ 73.63%