90% affiliate

Code Review | Affiliate

WordPress plugin Affiliate scored90%from 54 tests.

About plugin

  • Plugin page: affiliate
  • Plugin version: 1.12.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 13, 2014
  • Latest release: Jul 13, 2023
  • Number of updates: 49
  • Update frequency: every 69.0 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /10,734 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.20ms] Passed 4 tests

A check of server-side resources used by Affiliate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0952.18 ▲13.04
Dashboard /wp-admin3.37 ▲0.0644.70 ▼6.89
Posts /wp-admin/edit.php3.42 ▲0.0644.56 ▼0.88
Add New Post /wp-admin/post-new.php5.95 ▲0.0784.96 ▼20.21
Media Library /wp-admin/upload.php3.28 ▲0.0633.75 ▲3.18
Affiliate /wp-admin/admin.php?page=affiliate-admin3.2630.18
Settings /wp-admin/admin.php?page=affiliate-settings3.2530.11

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Affiliate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.21 ▼1.171.97 ▲0.1440.01 ▲0.47
Dashboard /wp-admin2,235 ▲465.86 ▲0.9499.05 ▼5.8980.99 ▲39.79
Posts /wp-admin/edit.php2,118 ▲292.02 ▲0.0234.68 ▼0.5433.83 ▲1.05
Add New Post /wp-admin/post-new.php1,548 ▲2923.15 ▲0.25742.74 ▲82.4462.93 ▲5.89
Media Library /wp-admin/upload.php1,414 ▲264.10 ▼0.0896.41 ▼6.4274.26 ▲25.11
Affiliate /wp-admin/admin.php?page=affiliate-admin8332.0227.7633.44
Settings /wp-admin/admin.php?page=affiliate-settings8572.0223.2925.05

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: link, marketer, marketing, affiliate, keyword

affiliate/affiliate.php Passed 13 tests

The primary PHP file in "Affiliate" version 1.12.0 is used by WordPress to initiate all plugin functionality
58 characters long description:
The Affiliate plugin is a toolbox for Affiliate Marketers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected773 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7112409745
Bourne Shell20019
CSS1109

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.33
▷ Minimum class complexity6.00
▷ Maximum class complexity39.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods37
▷ Static methods3491.89%
▷ Public methods3697.30%
▷ Protected methods00.00%
▷ Private methods12.70%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants969.23%
▷ Class constants430.77%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.29MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png58.73KB18.11KB▼ 69.16%
images/link.png0.27KB0.18KB▼ 34.89%
images/affiliate.png0.25KB0.16KB▼ 37.16%
screenshot-1.png10.27KB2.22KB▼ 78.42%
screenshot-5.png36.34KB9.88KB▼ 72.81%