68% viet-nam-affiliate

Code Review | Viet Nam Affiliate

WordPress plugin Viet Nam Affiliate scored68%from 54 tests.

About plugin

  • Plugin page: viet-nam-affiliate
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2019
  • Latest release: Apr 24, 2019
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: thanhtaivtt (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /649 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.27MB] [CPU: ▼11.71ms] Passed 4 tests

An overview of server-side resources used by Viet Nam Affiliate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.96 ▼1.90
Dashboard /wp-admin3.37 ▲0.0652.11 ▲5.01
Posts /wp-admin/edit.php3.42 ▲0.0653.38 ▲9.40
Add New Post /wp-admin/post-new.php4.66 ▼1.2344.37 ▼48.77
Media Library /wp-admin/upload.php3.29 ▲0.0634.85 ▼1.18
Viet Nam Affiliate /wp-admin/options-general.php?page=viet-nam-affiliate/viet-nam-affiliate.php3.2631.61

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Viet Nam Affiliate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.29 ▼1.071.79 ▲0.2344.81 ▼1.01
Dashboard /wp-admin2,211 ▲235.16 ▲0.27110.28 ▲4.8244.16 ▲4.82
Posts /wp-admin/edit.php2,107 ▲182.34 ▲0.2838.35 ▼2.0532.01 ▼1.97
Add New Post /wp-admin/post-new.php1,524 ▲523.30 ▲0.24659.91 ▲68.3256.92 ▲1.01
Media Library /wp-admin/upload.php1,393 ▲24.49 ▲0.17102.95 ▲3.8342.64 ▼1.19
Viet Nam Affiliate /wp-admin/options-general.php?page=viet-nam-affiliate/viet-nam-affiliate.php8902.0527.3746.03
Viet Nam Affiliate Report /wp-admin/viet-nam-afffiliate-report.php260.440.0914.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_tdc_link
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • TDC_AFFILIATE
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/viet-nam-affiliate/core/function/admin.php
    • > /wp-content/plugins/viet-nam-affiliate/viet-nam-affiliate.php
    • > /wp-content/plugins/viet-nam-affiliate/core/config/constant.php
    • > /wp-content/plugins/viet-nam-affiliate/core/TDC.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/viet-nam-afffiliate-report.php
    • > Network (severe)
    wp-admin/viet-nam-afffiliate-report.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% 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
4 plugin tags: affiliate, mmo, viet nam affiliate, affiliate tools

viet-nam-affiliate/viet-nam-affiliate.php 92% from 13 tests

"Viet Nam Affiliate" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Success! There were no dangerous files found in this plugin9,114 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript142,1197,1557,333
CSS1334801,449
PHP590129306
Markdown118026

PHP code Passed 2 tests

This is a short overview 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.22
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods233.33%
▷ Public methods350.00%
▷ Protected methods00.00%
▷ Private methods350.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants1
▷ Global constants1100.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/DataTables-1.10.18/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/css/DataTables-1.10.18/images/sort_both.png0.20KB0.29KB0.00%
assets/css/DataTables-1.10.18/images/sort_desc.png0.15KB0.25KB0.00%
assets/css/DataTables-1.10.18/images/sort_desc_disabled.png0.14KB0.25KB0.00%
assets/css/DataTables-1.10.18/images/sort_asc.png0.16KB0.25KB0.00%