84% yampi-checkout

Code Review | Yampi Checkout

WordPress plugin Yampi Checkout scored84%from 54 tests.

About plugin

  • Plugin page: yampi-checkout
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 27, 2020
  • Latest release: Jun 10, 2022
  • Number of updates: 10
  • Update frequency: every 80.5 days
  • Top authors: lucascolette (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /16,045 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.00MB] [CPU: ▼6.22ms] Passed 4 tests

This is a short check of server-side resources used by Yampi Checkout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.26 ▼2.54
Dashboard /wp-admin3.32 ▼0.0345.76 ▼12.11
Posts /wp-admin/edit.php3.37 ▲0.0142.24 ▼3.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.62 ▼6.71
Media Library /wp-admin/upload.php3.24 ▲0.0134.45 ▼2.67

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Yampi Checkout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.091.63 ▲0.0436.70 ▼4.54
Dashboard /wp-admin2,198 ▲245.64 ▲0.0582.65 ▼4.1538.99 ▼1.00
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0435.76 ▼5.3137.20 ▼0.33
Add New Post /wp-admin/post-new.php1,526 ▼223.14 ▲0.35692.53 ▲19.7654.77 ▼0.66
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.03108.46 ▲13.9948.80 ▲3.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yampi-checkout/yampi-wc.php:124

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: dropshipping checkout, yampi, checkout, checkout transparente, onepage checkout

yampi-checkout/yampi-wc.php 92% from 13 tests

The primary PHP file in "Yampi Checkout" version 1.0.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("yampi-checkout.php" instead of "yampi-wc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected75 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1163375

PHP code Passed 2 tests

A brief analysis 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.22
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
No PNG files were detected