94% gamipress-woocommerce-integration

Code Review | GamiPress - WooCommerce integration

WordPress plugin GamiPress - WooCommerce integration scored 94% from 54 tests.

About plugin

  • Plugin page: gamipress-woocomm...
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: Jul 24, 2017
  • Latest release: Jan 24, 2022
  • Number of updates: 59
  • Update frequency: every 27.9 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 21,674 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼302.76ms] Passed 4 tests

Analyzing server-side resources used by GamiPress - WooCommerce integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0662.80 ▼38.87
Dashboard /wp-admin3.43 ▲0.0334.30 ▼2.39
Posts /wp-admin/edit.php3.67 ▲0.0342.11 ▲0.13
Add New Post /wp-admin/post-new.php6.90 ▼0.0793.68 ▼1,169.92
Media Library /wp-admin/upload.php3.32 ▲0.0226.84 ▲2.79

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GamiPress - WooCommerce integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲6915.14 ▼0.575.82 ▼3.052.38 ▲0.14
Dashboard /wp-admin2,920 ▲626.16 ▼0.10118.36 ▼16.78155.37 ▼5.60
Posts /wp-admin/edit.php2,719 ▲283.24 ▲0.0065.07 ▼1.72146.48 ▼7.43
Add New Post /wp-admin/post-new.php1,773 ▲11221.96 ▼0.83490.92 ▲33.75162.83 ▼0.85
Media Library /wp-admin/upload.php1,726 ▲345.48 ▼0.06194.25 ▲46.14199.36 ▼11.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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/gamipress-woocommerce-integration/gamipress-woocommerce.php:223

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

gamipress-woocommerce-integration/gamipress-woocommerce.php 92% from 13 tests

The primary PHP file in "GamiPress - WooCommerce integration" version 1.3.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gamipress-woocommerce-integration.php" instead of "gamipress-woocommerce.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
Good job! No executable or dangerous file extensions detected1,336 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP104706411,225
JavaScript23619111

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin