94% gamipress-affiliatewp-integration

Code Review | GamiPress - AffiliateWP integration

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

About plugin

  • Plugin page: gamipress-affilia...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.8.1
  • First release: Jul 24, 2017
  • Latest release: Jan 24, 2022
  • Number of updates: 29
  • Update frequency: every 56.8 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 4,776 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by GamiPress - AffiliateWP integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0123.99 ▼10.11
Dashboard /wp-admin3.07 ▲0.0042.85 ▲1.48
Posts /wp-admin/edit.php3.12 ▲0.0134.22 ▼0.34
Add New Post /wp-admin/post-new.php5.43 ▼0.0174.37 ▼575.08
Media Library /wp-admin/upload.php3.01 ▲0.0124.30 ▼1.47

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

GamiPress - AffiliateWP integration: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲4315.75 ▼0.248.56 ▲2.5173.64 ▼31.86
Dashboard /wp-admin2,958 ▲626.14 ▼0.15121.82 ▼8.76170.59 ▼2.78
Posts /wp-admin/edit.php2,770 ▲303.24 ▲0.0165.22 ▲0.88138.98 ▼1.41
Add New Post /wp-admin/post-new.php3,737 ▼7818.53 ▼0.51427.14 ▲0.56155.14 ▼6.29
Media Library /wp-admin/upload.php1,780 ▲345.52 ▼0.01146.61 ▼20.36184.38 ▼14.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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-affiliatewp-integration/gamipress-affiliatewp.php:237

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

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

The main file in "GamiPress - AffiliateWP integration" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("gamipress-affiliatewp-integration.php" instead of "gamipress-affiliatewp.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
There were no executable files found in this plugin191 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP489213191

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity8.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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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