94% sell-media-affiliate

Code Review | Sell Media Affiliate Integration

WordPress plugin Sell Media Affiliate Integration scored 94% from 54 tests.

About plugin

  • Plugin page: sell-media-affiliate
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.1
  • WordPress version: 5.8.1
  • First release: Jul 20, 2016
  • Latest release: Feb 23, 2019
  • Number of updates: 5
  • Update frequency: every 189.8 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 891 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Sell Media Affiliate Integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0133.53 ▲0.15
Dashboard /wp-admin3.07 ▲0.0149.82 ▼2.18
Posts /wp-admin/edit.php3.12 ▲0.0145.05 ▼1.22
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.58 ▼575.73
Media Library /wp-admin/upload.php3.01 ▲0.0133.15 ▼0.62

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Sell Media Affiliate Integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲8216.27 ▲0.748.97 ▼0.6747.66 ▲0.34
Dashboard /wp-admin2,970 ▲365.91 ▼0.06138.34 ▼45.93105.34 ▼5.60
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0185.34 ▲14.4492.85 ▲2.33
Add New Post /wp-admin/post-new.php1,615 ▼6821.41 ▲2.63286.66 ▼129.06106.54 ▼5.93
Media Library /wp-admin/upload.php1,810 ▲35.05 ▲0.00160.69 ▲1.50109.44 ▼13.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sell-media-affiliate/main.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: sell, ecommerce, affiliate, e-commerce, sales

sell-media-affiliate/main.php 85% from 13 tests

The entry point to "Sell Media Affiliate Integration" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sell-media-affiliate.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin