84% woo-moeda-pay

Code Review | WooCommerce Moeda Pay

WordPress plugin WooCommerce Moeda Pay scored84%from 54 tests.

About plugin

  • Plugin page: woo-moeda-pay
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.2.3
  • WordPress version: 6.3.1
  • First release: Jul 18, 2019
  • Latest release: Apr 13, 2020
  • Number of updates: 20
  • Update frequency: every 13.6 days
  • Top authors: victorbfc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼10.02ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Moeda Pay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.03 ▼2.49
Dashboard /wp-admin3.38 ▲0.0444.83 ▼18.21
Posts /wp-admin/edit.php3.43 ▲0.0752.38 ▲3.73
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.73 ▼22.24
Media Library /wp-admin/upload.php3.31 ▲0.0736.77 ▲2.87

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Moeda Pay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.21 ▼1.111.58 ▼0.2237.03 ▼2.63
Dashboard /wp-admin2,206 ▲144.86 ▼0.07110.83 ▼5.7943.00 ▼4.24
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0536.96 ▲0.7534.94 ▼1.47
Add New Post /wp-admin/post-new.php1,514 ▼2017.46 ▼5.99667.28 ▼11.8553.12 ▼0.14
Media Library /wp-admin/upload.php1,385 ▲34.23 ▲0.0296.51 ▼5.5539.83 ▼3.96

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-moeda-pay/utils/notification.php:72

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: moedapay, woocommerce, payment

woo-moeda-pay/moedapay-woocommerce.php 92% from 13 tests

The main PHP file in "WooCommerce Moeda Pay" ver. 2.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-moeda-pay.php" instead of "moedapay-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected431 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP46751427
Markdown1204

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
moedapay.png13.68KB4.68KB▼ 65.82%