84% savyour-affiliate-partner

Code Review | Savyour Affiliate Partner

WordPress plugin Savyour Affiliate Partner scored84%from 54 tests.

About plugin

  • Plugin page: savyour-affiliate...
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Aug 16, 2023
  • Number of updates: 23
  • Update frequency: every 50.9 days
  • Top authors: savyour (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,250 total downloads

Benchmarks

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
Installer ran successfully

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

This is a short check of server-side resources used by Savyour Affiliate Partner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0750.02 ▲8.90
Dashboard /wp-admin3.37 ▲0.0247.47 ▼17.23
Posts /wp-admin/edit.php3.42 ▲0.0645.34 ▲0.23
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.80 ▲4.92
Media Library /wp-admin/upload.php3.29 ▲0.0633.65 ▼3.44

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Savyour Affiliate Partner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7014.35 ▲0.111.76 ▲0.1843.97 ▲3.94
Dashboard /wp-admin2,208 ▲315.53 ▼0.1682.67 ▼4.7640.67 ▼5.02
Posts /wp-admin/edit.php2,116 ▲132.02 ▲0.0037.90 ▲3.5631.41 ▼1.28
Add New Post /wp-admin/post-new.php1,540 ▲1221.92 ▼1.44623.93 ▼67.6855.06 ▼3.32
Media Library /wp-admin/upload.php1,410 ▲134.23 ▲0.0396.56 ▼6.7642.07 ▼1.95

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/savyour-affiliate-partner/savyour-affiliate-partner.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/savyour-affiliate-partner/includes/savap-functions.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/savyour-affiliate-partner/includes/savap-admin-template.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
No tags were found

savyour-affiliate-partner/savyour-affiliate-partner.php Passed 13 tests

Analyzing the main PHP file in "Savyour Affiliate Partner" version 2.1.4
56 characters long description:
Affiliate integration plugin between Savyour and partner

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected453 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34124341
CSS10066
JavaScript28346

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png120.72KB29.46KB▼ 75.60%