89% guest-author-affiliate

Code Review | Guest Author Affiliate

WordPress plugin Guest Author Affiliate scored 89% from 54 tests.

About plugin

  • Plugin page: guest-author-affi...
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 7, 2020
  • Latest release: Jul 8, 2023
  • Number of updates: 10
  • Update frequency: every 109.6 days
  • Top authors: olegabr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 570 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.03MB] [CPU: ▲25.35ms] 50% from 4 tests

An overview of server-side resources used by Guest Author Affiliate
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,227.03ms on /wp-admin/options-general.php?page=guest_author_affiliate_settings)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.03MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4264.21 ▲20.64
Dashboard /wp-admin8.90 ▲5.6075.98 ▲26.79
Posts /wp-admin/edit.php8.90 ▲5.5571.90 ▲19.46
Add New Post /wp-admin/post-new.php9.45 ▲3.57130.08 ▲38.73
Media Library /wp-admin/upload.php8.90 ▲5.6865.76 ▲34.49
Guest Author Affiliate /wp-admin/options-general.php?page=guest_author_affiliate_settings8.911,227.03
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9057.62

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 214 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
fs_active_plugins
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
fs_accounts
fs_debug_mode
widget_recent-comments
widget_recent-posts
guest_author_affiliate_version

Browser metrics Passed 4 tests

A check of browser resources used by Guest Author Affiliate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21514.05 ▼0.335.26 ▲3.2433.02 ▼14.60
Dashboard /wp-admin2,248 ▲636.05 ▲1.04108.97 ▼5.7646.64 ▲0.90
Posts /wp-admin/edit.php2,131 ▲422.01 ▼0.0441.88 ▲3.1439.90 ▲6.53
Add New Post /wp-admin/post-new.php1,552 ▲1818.31 ▼4.90604.13 ▼65.5250.85 ▲0.86
Media Library /wp-admin/upload.php1,430 ▲394.23 ▲0.0497.23 ▼2.5145.68 ▲0.77
Guest Author Affiliate /wp-admin/options-general.php?page=guest_author_affiliate_settings1,2033.2048.6693.68
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0862.2324.3125.11

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
  • Zombie WordPress options detected upon uninstall: 10 options
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-posts
    • guest_author_affiliate_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_active_plugins
    • fs_accounts
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 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
6 plugin tags: affiliate marketing, affiliate, affiliates manager, affiliate plugin, guest author...

guest-author-affiliate/guest-author-affiliate.php Passed 13 tests

The entry point to "Guest Author Affiliate" version 1.1.6 is a PHP file that has certain tags in its header comment area
62 characters long description:
Allows your site's content creators to become your affiliates.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected34,963 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1358,38918,08634,507
JavaScript85380274
JSON100129
SVG10140
CSS130013

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity82.07
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes57
▷ Abstract classes23.51%
▷ Concrete classes5596.49%
▷ Final classes00.00%
Methods1,347
▷ Static methods21415.89%
▷ Public methods95270.68%
▷ Protected methods171.26%
▷ Private methods37828.06%
Functions105
▷ Named functions10499.05%
▷ Anonymous functions10.95%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.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
6 PNG files occupy 0.41MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png210.91KB3.52KB▼ 98.33%
assets/banner-772x250.png20.97KB9.38KB▼ 55.27%
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/icon-128x128.png83.39KB2.55KB▼ 96.95%
assets/banner-1544x500.png86.71KB32.44KB▼ 62.59%