68% envato-affiliater

Code Review | Envato Affiliater

WordPress plugin Envato Affiliater scored68%from 54 tests.

About plugin

  • Plugin page: envato-affiliater
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Jul 19, 2013
  • Latest release: Aug 5, 2013
  • Number of updates: 12
  • Update frequency: every 1.4 days
  • Top authors: khaninejad (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,373 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.78ms] Passed 4 tests

This is a short check of server-side resources used by Envato Affiliater
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.16 ▼1.68
Dashboard /wp-admin3.34 ▲0.0353.29 ▼1.50
Posts /wp-admin/edit.php3.39 ▲0.0349.64 ▼13.33
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.21 ▼2.59
Media Library /wp-admin/upload.php3.26 ▲0.0339.18 ▲2.14
Envato Affiliater /wp-admin/tools.php?page=envato-affiliater-options3.2732.87

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
wp_bitly_external
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Envato Affiliater: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.441.71 ▲0.2343.03 ▼8.08
Dashboard /wp-admin2,196 ▲285.57 ▼0.0681.38 ▼13.5338.80 ▼8.47
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0233.73 ▼8.3035.73 ▼2.67
Add New Post /wp-admin/post-new.php1,539 ▲623.20 ▲0.25659.21 ▲52.8052.51 ▲0.46
Media Library /wp-admin/upload.php1,404 ▲134.18 ▲0.0298.40 ▼10.5148.27 ▲6.95
Envato Affiliater /wp-admin/tools.php?page=envato-affiliater-options8611.9925.0128.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_bitly_external
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=envato-affiliater-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/tools.php?page=envato-affiliater-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/envato-affiliater/plugin-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/envato-affiliater/Envato-Affiliater.php:51

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin Option in Tools), #2 (Set plugin setting)
You can look at the official readme.txt

envato-affiliater/Envato-Affiliater.php 92% from 13 tests

This is the main PHP file of "Envato Affiliater" version 1.2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("envato-affiliater.php" instead of "Envato-Affiliater.php")

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
Everything looks great! No dangerous files found in this plugin3,941 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41002,2593,941

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity65.13
▷ Minimum class complexity1.00
▷ Maximum class complexity555.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes00.00%
Methods284
▷ Static methods7426.06%
▷ Public methods23683.10%
▷ Protected methods4315.14%
▷ Private methods51.76%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.24MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png59.56KB23.11KB▼ 61.20%
screenshot-1.png186.91KB69.21KB▼ 62.97%