84% gamipress-wc-points-per-purchase-total

Code Review | GamiPress - WooCommerce Points Per Purchase Total

WordPress plugin GamiPress - WooCommerce Points Per Purchase Total scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-wc-poin...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Feb 24, 2020
  • Latest release: Sep 4, 2023
  • Number of updates: 19
  • Update frequency: every 68.0 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /7,111 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by GamiPress - WooCommerce Points Per Purchase Total
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0233.77 ▼5.02
Dashboard /wp-admin3.33 ▼0.0241.26 ▼20.62
Posts /wp-admin/edit.php3.38 ▲0.0248.14 ▲2.71
Add New Post /wp-admin/post-new.php5.91 ▲0.0277.67 ▼15.48
Media Library /wp-admin/upload.php3.25 ▲0.0236.04 ▲2.64

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

GamiPress - WooCommerce Points Per Purchase Total: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.22 ▼1.164.47 ▲2.7538.75 ▼5.35
Dashboard /wp-admin2,223 ▲324.86 ▼1.05112.46 ▲12.5442.14 ▼1.88
Posts /wp-admin/edit.php2,112 ▲232.04 ▲0.0440.69 ▲0.9936.62 ▲3.89
Add New Post /wp-admin/post-new.php1,558 ▲2518.05 ▼5.05622.80 ▼42.3750.31 ▼15.83
Media Library /wp-admin/upload.php1,402 ▲144.20 ▼0.0397.05 ▼11.4242.83 ▼1.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-wc-points-per-purchase-total/gamipress-wc-points-per-purchase-total.php:223

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can look at the official readme.txt

gamipress-wc-points-per-purchase-total/gamipress-wc-points-per-purchase-total.php Passed 13 tests

The primary PHP file in "GamiPress - WooCommerce Points Per Purchase Total" version 1.0.5 is used by WordPress to initiate all plugin functionality
51 characters long description:
Award points based on WooCommerce purchase's total.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin238 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4106214226
JavaScript24112

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected