80% smdp-affiliate-platform

Code Review | Affiliate Platform

WordPress plugin Affiliate Platform scored80%from 54 tests.

About plugin

  • Plugin page: smdp-affiliate-pl...
  • Plugin version: 1.4.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Oct 10, 2020
  • Latest release: Sep 23, 2021
  • Number of updates: 78
  • Update frequency: every 4.5 days
  • Top authors: igomatos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,631 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▲0.49ms] Passed 4 tests

Analyzing server-side resources used by Affiliate Platform
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3544.44 ▲7.19
Dashboard /wp-admin3.66 ▲0.3547.28 ▲1.02
Posts /wp-admin/edit.php3.78 ▲0.4147.57 ▲2.51
Add New Post /wp-admin/post-new.php6.26 ▲0.3783.58 ▼5.14
Media Library /wp-admin/upload.php3.59 ▲0.3536.70 ▲3.56
SMDP Referral Platform Settings /wp-admin/options-general.php?page=smdp_Affiliate_platform_settings3.5838.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: 1 new table, 9 new options
New tables
wp_sm_commissions_trans
New WordPress options
can_compress_scripts
theysaidso_admin_options
smdp_commtrans_db_version
widget_recent-posts
db_upgraded
smdp_Affiliate_platform_version
smsudp_db_version
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Affiliate Platform
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲9413.86 ▼0.789.33 ▲7.5247.79 ▲4.99
Dashboard /wp-admin2,203 ▲265.59 ▲0.0685.27 ▼6.7439.35 ▼7.45
Posts /wp-admin/edit.php2,108 ▲82.02 ▼0.0135.05 ▲1.0034.45 ▲0.38
Add New Post /wp-admin/post-new.php1,533 ▲723.34 ▲0.36626.70 ▼55.0050.98 ▼6.48
Media Library /wp-admin/upload.php1,408 ▲114.23 ▲0.0197.01 ▼12.0945.00 ▼2.82
SMDP Referral Platform Settings /wp-admin/options-general.php?page=smdp_Affiliate_platform_settings1,0293.1847.8030.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_sm_commissions_trans
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • smdp_commtrans_db_version
    • smdp_Affiliate_platform_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • smsudp_db_version
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

smdp-affiliate-platform/smdp-affiliate-platform.php Passed 13 tests

The entry point to "Affiliate Platform" version 1.4.8 is a PHP file that has certain tags in its header comment area
49 characters long description:
Plugin for woo adding referral links to products.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,727 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP99847311,640
JavaScript516655
PO File18931
Markdown1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity22.40
▷ Minimum class complexity5.00
▷ Maximum class complexity62.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3794.87%
▷ Protected methods00.00%
▷ Private methods25.13%
Functions27
▷ Named functions2696.30%
▷ Anonymous functions13.70%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin