89% affiliatewp-starting-affiliate-id

Code Review | AffiliateWP - Starting Affiliate ID

WordPress plugin AffiliateWP - Starting Affiliate ID scored89%from 54 tests.

About plugin

  • Plugin page: affiliatewp-start...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jul 11, 2019
  • Latest release: Jun 3, 2022
  • Number of updates: 10
  • Update frequency: every 105.8 days
  • Top authors: sumobi (50%)dbeja (50%)tubiz (20%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /6,505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.41ms] Passed 4 tests

A check of server-side resources used by AffiliateWP - Starting Affiliate ID
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.73 ▼6.49
Dashboard /wp-admin3.36 ▲0.0647.26 ▼2.77
Posts /wp-admin/edit.php3.47 ▲0.1244.24 ▼5.02
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.37 ▼15.35
Media Library /wp-admin/upload.php3.28 ▲0.0537.51 ▲3.55

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for AffiliateWP - Starting Affiliate ID
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲614.38 ▼0.181.83 ▼0.0743.69 ▼1.15
Dashboard /wp-admin2,201 ▲245.60 ▼0.0087.40 ▼11.9939.11 ▼5.48
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0435.82 ▼1.9132.59 ▲0.63
Add New Post /wp-admin/post-new.php1,531 ▼2022.98 ▲4.91610.79 ▼28.2068.62 ▼16.67
Media Library /wp-admin/upload.php1,403 ▲34.17 ▲0.02101.85 ▼2.8343.56 ▼4.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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

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 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
1 plugin tags: affiliatewp

affiliatewp-starting-affiliate-id/affiliatewp-starting-affiliate-id.php 85% from 13 tests

The principal PHP file in "AffiliateWP - Starting Affiliate ID" v. 1.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")

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
Success! There were no dangerous files found in this plugin794 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP92851,113780
XML10014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.14
▷ Minimum class complexity5.00
▷ Maximum class complexity13.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes228.57%
▷ Concrete classes571.43%
▷ Final classes120.00%
Methods81
▷ Static methods67.41%
▷ Public methods3745.68%
▷ Protected methods2429.63%
▷ Private methods2024.69%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected