73% affiliate-notice-manager

Code Review | Affiliate Notice Manager

WordPress plugin Affiliate Notice Manager scored 73% from 54 tests.

About plugin

  • Plugin page: affiliate-notice-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 17, 2021
  • Latest release: Sep 9, 2023
  • Number of updates: 9
  • Update frequency: every 73.6 days
  • Top authors: dragwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 764 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.31MB] [CPU: ▼17.15ms] Passed 4 tests

Analyzing server-side resources used by Affiliate Notice Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0233.43 ▼8.26
Dashboard /wp-admin3.33 ▲0.0347.05 ▼1.48
Posts /wp-admin/edit.php3.38 ▲0.0249.45 ▲6.60
Add New Post /wp-admin/post-new.php4.62 ▼1.2744.47 ▼61.61
Media Library /wp-admin/upload.php3.25 ▲0.0234.04 ▲2.76
Support /wp-admin/admin.php?page=affiliate-notice-support3.2730.13
Settings /wp-admin/admin.php?page=affiliate-notice-settings3.2629.03

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Affiliate Notice Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲15313.96 ▼0.335.10 ▲3.0243.76 ▼3.05
Dashboard /wp-admin2,236 ▲454.85 ▼0.09107.93 ▲0.2939.29 ▼3.77
Posts /wp-admin/edit.php2,116 ▲272.06 ▲0.0540.39 ▲3.2735.66 ▲0.77
Add New Post /wp-admin/post-new.php1,546 ▲1318.24 ▼4.94617.30 ▲19.8068.19 ▲18.08
Media Library /wp-admin/upload.php1,409 ▲214.18 ▼0.0697.23 ▼5.0841.51 ▼2.31
Support /wp-admin/admin.php?page=affiliate-notice-support8732.0222.7024.95
Settings /wp-admin/admin.php?page=affiliate-notice-settings8082.0724.1526.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=affiliate-notice-settings
    • > Notice in wp-content/plugins/affiliate-notice-manager/admin/class-affiliate-notice-manager-admin.php+192
    Trying to access array offset on value of type bool

SRP 0% from 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/affiliate-notice-manager/public/partials/affiliate-notice-manager-public-display.php
    • > /wp-content/plugins/affiliate-notice-manager/admin/partials/affiliate-notice-manager-admin-display.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/affiliate-notice-manager/admin/partials/tmpl-notice-manager-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/affiliate-notice-manager/admin/partials/tmpl-affiliate-notice-manager-support.php:2

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


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: plugin, affiliate, post, disclosure, wordpress...

affiliate-notice-manager/affiliate-notice-manager.php Passed 13 tests

The main file in "Affiliate Notice Manager" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin296 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.43
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.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 files were detected