10% sotmarket-affiliate-plugin

Code Review | Sotmarket Affiliate plugin

WordPress plugin Sotmarket Affiliate plugin scored10%from 54 tests.

About plugin

  • Plugin page: sotmarket-affilia...
  • Plugin version: 3.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 3, 2012
  • Latest release: Oct 4, 2013
  • Number of updates: 91
  • Update frequency: every 4.4 days
  • Top authors: GSMtricks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,637 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/sotmarket-affiliate-plugin/sotmarket.php+80
    syntax error, unexpected 'new' (T_NEW)

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.77ms] Passed 4 tests

A check of server-side resources used by Sotmarket Affiliate plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.55 ▼1.47
Dashboard /wp-admin3.31 ▲0.0051.98 ▲1.45
Posts /wp-admin/edit.php3.36 ▲0.0051.94 ▼3.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.56 ▼15.15
Media Library /wp-admin/upload.php3.23 ▲0.0041.53 ▲2.39

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 90 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Sotmarket Affiliate plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.181.62 ▼0.5442.89 ▼2.30
Dashboard /wp-admin2,198 ▲215.68 ▲0.0284.30 ▼11.3441.93 ▼1.02
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0140.70 ▲1.1637.58 ▼2.09
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▼0.04678.18 ▲34.3053.54 ▼3.95
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0798.89 ▼7.7045.72 ▲1.53

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 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 0% from 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
Please fix the following items
  • 22× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_info_base.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_popular_short.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_related_full.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_related_3columns.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_info_full.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_info_short.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_popular_base.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_popular_full.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_related_short.php
    • > /wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_info_3columns.php
  • 313× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: aProduct in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_related_5columnscustom.php on line 18
    • > PHP Notice
      Undefined variable: aProduct in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_analog_base.php on line 18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_popular_base.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_related_2columns.php on line 18
    • > PHP Notice
      Undefined variable: aProduct in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_info_full.php on line 10
    • > PHP Notice
      Undefined variable: aProduct in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_info_3columns.php on line 18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_popular_full.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_info_base.php on line 17
    • > PHP Notice
      Undefined variable: aProduct in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_info_2columns.php on line 18
    • > PHP Notice
      Undefined variable: aProduct in wp-content/plugins/sotmarket-affiliate-plugin/templates/sotmarket_analog_full.php on line 12

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

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Настройки плагина), #2 (Генератор тегов), #3 (Виджеты на странице), #4 (Товары в странице)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

sotmarket-affiliate-plugin/sotmarket.php 92% from 13 tests

The main PHP file in "Sotmarket Affiliate plugin" ver. 3.0.9 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sotmarket-affiliate-plugin.php" instead of "sotmarket.php")

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
Good job! No executable or dangerous file extensions detected4,972 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP651,0241,8214,615
JavaScript3404154
Markdown1500150
CSS11353

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.10
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes817.78%
Methods205
▷ Static methods2110.24%
▷ Public methods17786.34%
▷ Protected methods178.29%
▷ Private methods115.37%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants48
▷ Global constants48.33%
▷ Class constants4491.67%
▷ Public constants44100.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