84% multicom-affiliate-registration

Code Review | MultiCOM Affiliate Tracker

WordPress plugin MultiCOM Affiliate Tracker scored84%from 54 tests.

About plugin

  • Plugin page: multicom-affiliat...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Nov 23, 2020
  • Latest release: Jul 16, 2022
  • Number of updates: 12
  • Update frequency: every 50.5 days
  • Top authors: obsidiansoftwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /778 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by MultiCOM Affiliate Tracker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.90 ▲0.26
Dashboard /wp-admin3.31 ▲0.0049.04 ▼0.35
Posts /wp-admin/edit.php3.36 ▲0.0047.78 ▼0.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.90 ▼11.81
Media Library /wp-admin/upload.php3.23 ▲0.0036.06 ▲1.92

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for MultiCOM Affiliate Tracker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.29 ▼1.081.96 ▲0.1143.71 ▲4.81
Dashboard /wp-admin2,209 ▲175.85 ▲0.89102.61 ▼13.7338.36 ▼3.06
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0139.34 ▼0.0935.73 ▲1.13
Add New Post /wp-admin/post-new.php1,542 ▲918.17 ▼5.24614.78 ▼70.7649.17 ▲2.13
Media Library /wp-admin/upload.php1,382 ▼34.20 ▲0.0196.89 ▼2.2642.75 ▲0.56

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/multicom-affiliate-registration/wp-multicom-info-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
4 plugin tags: commission, affiliate, form registration, replicated

multicom-affiliate-registration/wp-multicom-referrals.php 85% from 13 tests

The entry point to "MultiCOM Affiliate Tracker" version 1.4.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("multicom-affiliate-registration.php" instead of "wp-multicom-referrals.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
Everything looks great! No dangerous files found in this plugin2,059 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP164259001,982
JavaScript29074
CSS1003

PHP code Passed 2 tests

A brief analysis 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.36
Average class complexity18.92
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods101
▷ Static methods76.93%
▷ Public methods9695.05%
▷ Protected methods00.00%
▷ Private methods54.95%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin