78% devnet-eantrm

Code Review | Eant Affiliate

WordPress plugin Eant Affiliate scored 78% from 54 tests.

About plugin

  • Plugin page: devnet-eantrm
  • Plugin version: 6.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.0.1
  • WordPress version: 5.9.2
  • First release: Jul 6, 2017
  • Latest release: Aug 29, 2020
  • Number of updates: 25
  • Update frequency: every 50.5 days
  • Top authors: devnetvietnam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,177 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.75MB] [CPU: ▼295.03ms] Passed 4 tests

This is a short check of server-side resources used by Eant Affiliate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.68 ▲1.1660.42 ▲12.90
Dashboard /wp-admin4.35 ▲0.9424.46 ▼8.25
Posts /wp-admin/edit.php4.41 ▲0.7729.78 ▼11.43
Add New Post /wp-admin/post-new.php7.20 ▲0.2281.05 ▼1,173.32
Media Library /wp-admin/upload.php4.38 ▲1.0763.88 ▲33.27
Manage Order /wp-admin/admin.php?page=eant-manage-form-order4.4027.10
Bitly Shortlink /wp-admin/admin.php?page=eant-bitly_shortlink4.4233.61
Google Shortlink /wp-admin/admin.php?page=eant-google_shortlink4.4227.76
Custom CSS /wp-admin/admin.php?page=eant-custom-css4.4225.79
Manage Link Shortcode /wp-admin/admin.php?page=eant-manage-link-shortcode4.4027.48
Notification-Info /wp-admin/admin.php?page=eant-info4.4226.54
Setting /wp-admin/admin.php?page=eant-config4.4228.37
Manage Lead /wp-admin/admin.php?page=eant-manage-lead4.4025.96
Manage Color /wp-admin/admin.php?page=color-setting-RM4.4227.46

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 73 new files
Database: 5 new tables, no new options
New tables
wp_form_manage_order
wp_district
wp_manage_link_shortcode
wp_province
wp_form_manage_lead

Browser metrics Passed 4 tests

An overview of browser requirements for Eant Affiliate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,975 ▲23117.11 ▲1.1514.13 ▲7.712.52 ▲0.33
Dashboard /wp-admin2,976 ▲1186.48 ▲0.28122.74 ▼14.60157.49 ▼4.61
Posts /wp-admin/edit.php2,771 ▲773.29 ▲0.0566.21 ▲2.51138.66 ▼4.50
Add New Post /wp-admin/post-new.php1,720 ▼3217.08 ▼3.80389.72 ▼76.68174.22 ▲14.79
Media Library /wp-admin/upload.php1,783 ▲855.84 ▲0.41128.25 ▼18.37189.28 ▼1.54
Manage Order /wp-admin/admin.php?page=eant-manage-form-order2,4219.04166.81232.84
Bitly Shortlink /wp-admin/admin.php?page=eant-bitly_shortlink1,1342.7758.75126.41
Google Shortlink /wp-admin/admin.php?page=eant-google_shortlink1,1242.7755.49129.99
Custom CSS /wp-admin/admin.php?page=eant-custom-css1,1182.7864.32154.04
Manage Link Shortcode /wp-admin/admin.php?page=eant-manage-link-shortcode1,1102.9054.87130.05
Notification-Info /wp-admin/admin.php?page=eant-info1,0932.7754.70112.49
Setting /wp-admin/admin.php?page=eant-config1,3192.8853.83126.87
Manage Lead /wp-admin/admin.php?page=eant-manage-lead1,4703.0560.49184.03
Manage Color /wp-admin/admin.php?page=color-setting-RM1,1612.7756.16138.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 5 tables
    • wp_province
    • wp_form_manage_lead
    • wp_form_manage_order
    • wp_district
    • wp_manage_link_shortcode

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eant-manage-lead
    • > Notice in wp-content/plugins/devnet-eantrm/app/views/ViewManageFormLead.php+18
    Undefined index: shortcode_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eant-manage-lead
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/devnet-eantrm/app/ctrs/DynamicField.php+23
    Undefined index: devnet_referral
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eant-manage-lead
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/devnet-eantrm/app/ctrs/DynamicField.php+26
    Trying to get property 'referral_tracking' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/devnet-eantrm/loader.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/devnet-eantrm/loader.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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 to be fixed:
  • Screenshots: Screenshot #1 (http://www.eantrm.com/wp-content/uploads/2016/12/eantrm-1.png) image required
You can look at the official readme.txt

devnet-eantrm/enatrm.php 85% from 13 tests

"Eant Affiliate" version 6.6.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("devnet-eantrm.php" instead of "enatrm.php")
  • Description: A good plugin description is longer than 10 characters (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin12,670 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP397609585,356
CSS8592674,417
JavaScript124122232,079
SVG200818

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods195
▷ Static methods2412.31%
▷ Public methods19398.97%
▷ Protected methods21.03%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants110.00%
▷ Class constants990.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/share.png7.28KB4.38KB▼ 39.93%