84% tmd-aff

Code Review | TMD AFF

WordPress plugin TMD AFF scored84%from 54 tests.

About plugin

  • Plugin page: tmd-aff
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Nov 5, 2015
  • Number of updates: 38
  • Update frequency: every 0.1 days
  • Top authors: keyduc (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,569 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.56MB] [CPU: ▼11.97ms] Passed 4 tests

Analyzing server-side resources used by TMD AFF
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.94 ▲1.74
Dashboard /wp-admin3.43 ▲0.1351.73 ▲2.45
Posts /wp-admin/edit.php3.54 ▲0.1955.89 ▲4.27
Add New Post /wp-admin/post-new.php3.28 ▼2.6146.20 ▼56.32
Media Library /wp-admin/upload.php3.35 ▲0.1341.71 ▲7.22

Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/tmd-aff/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/tmd-aff/banner-772\303\227250.png"
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for TMD AFF
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲12414.80 ▲0.431.89 ▼0.0742.34 ▼0.49
Dashboard /wp-admin2,249 ▲615.82 ▲0.84100.01 ▼10.3248.18 ▼7.95
Posts /wp-admin/edit.php2,135 ▲462.02 ▲0.0247.08 ▲6.3439.24 ▲0.00
Add New Post /wp-admin/post-new.php6,333 ▲4,78624.92 ▲6.561,037.24 ▲371.9441.65 ▼13.29
Media Library /wp-admin/upload.php1,431 ▲434.17 ▼0.08113.70 ▼5.4046.04 ▼2.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tmd-aff/inc/ajax-call.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tmd-aff/inc/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tmd-aff/inc/notice.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tmd-aff/inc/products.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tmd-aff/tmd-aff.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tmd-aff/inc/meta-box.php:3

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (The screenshot description corresponds to screenshot-1.png), #2 (The screenshot description corresponds to screenshot-2.png), #3 (The screenshot description corresponds to screenshot-3.png)
The official readme.txt might help

tmd-aff/tmd-aff.php Passed 13 tests

The main PHP script in "TMD AFF" version 1.2.0 is automatically included on every request by WordPress
33 characters long description:
This plugin for aff amazon niche.

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 plugin2,202 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP82492942,022
CSS110142
JavaScript14238

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity115.00
▷ Minimum class complexity16.00
▷ Maximum class complexity198.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods118
▷ Static methods10.85%
▷ Public methods10286.44%
▷ Protected methods1613.56%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png99.23KB35.24KB▼ 64.48%
banner-772×250.png13.42KB6.64KB▼ 50.53%
screenshot-2.png25.72KB10.50KB▼ 59.18%
screenshot-3.png20.95KB7.21KB▼ 65.55%
screenshot.png13.42KB6.64KB▼ 50.53%