77% adservice-affiliate-network-tracking

Code Review | Adservice - Affiliate Network

WordPress plugin Adservice - Affiliate Network scored77%from 54 tests.

About plugin

  • Plugin page: adservice-affilia...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 37
  • Update frequency: every 17.0 days
  • Top authors: adserviceplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,575 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.31ms] Passed 4 tests

Analyzing server-side resources used by Adservice - Affiliate Network
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.54 ▼3.73
Dashboard /wp-admin3.37 ▲0.0747.68 ▼10.97
Posts /wp-admin/edit.php3.49 ▲0.1348.55 ▲1.99
Add New Post /wp-admin/post-new.php5.97 ▲0.0987.26 ▼8.54
Media Library /wp-admin/upload.php3.30 ▲0.0734.94 ▲5.10

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Adservice - Affiliate Network: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲7914.16 ▼0.181.73 ▲0.0359.37 ▲13.31
Dashboard /wp-admin2,244 ▲645.62 ▼0.0197.07 ▼2.5333.62 ▼12.51
Posts /wp-admin/edit.php2,151 ▲542.02 ▲0.0536.79 ▲0.7828.27 ▼7.60
Add New Post /wp-admin/post-new.php1,543 ▲1723.20 ▼0.42698.28 ▲78.7750.37 ▲1.88
Media Library /wp-admin/upload.php1,452 ▲554.21 ▲0.0395.14 ▼7.8634.40 ▼8.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/adservice-affiliate-network-tracking/admin/partials/astrk-admin-display.php
    • > /wp-content/plugins/adservice-affiliate-network-tracking/public/partials/astrk-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/adservice-affiliate-network-tracking/index.php:2

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

adservice-affiliate-network-tracking/astrk.php 77% from 13 tests

"Adservice - Affiliate Network" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("adservice-affiliate-network-tracking.php" instead of "astrk.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 218 characters long)

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
Success! There were no dangerous files found in this plugin1,082 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP15181540631
CSS26318443
JavaScript24546
SVG2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.38
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods516.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png5.18KB2.58KB▼ 50.24%
images/info.png15.26KB13.40KB▼ 12.21%