84% woocommerce-moip

Code Review | Claudio Sanches - Moip for WooCommerce

WordPress plugin Claudio Sanches - Moip for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-moip
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Nov 7, 2012
  • Latest release: Aug 11, 2020
  • Number of updates: 41
  • Update frequency: every 69.1 days
  • Top authors: claudiosanches (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /21,345 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Claudio Sanches - Moip for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0149.15 ▲11.00
Dashboard /wp-admin3.32 ▲0.0248.81 ▼0.23
Posts /wp-admin/edit.php3.37 ▲0.0147.46 ▼1.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.75 ▼5.29
Media Library /wp-admin/upload.php3.24 ▲0.0140.23 ▲2.62

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Claudio Sanches - Moip for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.27 ▼0.081.88 ▼0.4144.54 ▼7.04
Dashboard /wp-admin2,201 ▲245.55 ▼0.0790.07 ▼5.0540.60 ▼1.39
Posts /wp-admin/edit.php2,106 ▲61.97 ▼0.0036.21 ▲0.2838.09 ▼0.05
Add New Post /wp-admin/post-new.php1,532 ▼323.60 ▲5.31689.18 ▲6.3175.79 ▲6.72
Media Library /wp-admin/upload.php1,406 ▲64.13 ▼0.07118.13 ▲8.1849.67 ▲6.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-moip/includes/class-wc-moip-gateway.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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: moip, checkout, woocommerce

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

"Claudio Sanches - Moip for WooCommerce" version 2.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("3.8" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,583 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP72113391,227
JavaScript26356262
Sass121294

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity21.20
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods42
▷ Static methods1023.81%
▷ Public methods3173.81%
▷ Protected methods1023.81%
▷ Private methods12.38%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/mastercard.png1.57KB1.39KB▼ 10.92%
assets/images/hipercard.png1.49KB1.38KB▼ 7.21%
assets/images/itau.png1.56KB1.34KB▼ 14.26%
assets/images/bancodobrasil.png1.70KB1.44KB▼ 15.34%
assets/images/bradesco.png1.46KB1.29KB▼ 11.67%