79% agoda-affiliate-partners-text-link-generator

Code Review | Agoda Affiliate Partners Text Link Generator

WordPress plugin Agoda Affiliate Partners Text Link Generator scored79%from 54 tests.

About plugin

  • Plugin page: agoda-affiliate-p...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.8.0
  • WordPress version: 6.3.1
  • First release: Aug 18, 2017
  • Latest release: Aug 18, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: affiliateproduct (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /11,044 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.67ms] Passed 4 tests

Analyzing server-side resources used by Agoda Affiliate Partners Text Link Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.18 ▲0.27
Dashboard /wp-admin3.33 ▲0.0343.76 ▼8.89
Posts /wp-admin/edit.php3.38 ▲0.0345.35 ▼0.72
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.19 ▼7.75
Media Library /wp-admin/upload.php3.25 ▲0.0330.15 ▼5.33

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Agoda Affiliate Partners Text Link Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲5013.16 ▼1.401.64 ▼0.4344.11 ▼3.69
Dashboard /wp-admin2,216 ▲255.85 ▲0.9698.32 ▼2.0435.80 ▼8.06
Posts /wp-admin/edit.php2,099 ▲131.99 ▼0.0135.56 ▲0.2130.73 ▼5.48
Add New Post /wp-admin/post-new.php1,521 ▲723.09 ▲5.43628.30 ▼60.5361.14 ▲8.97
Media Library /wp-admin/upload.php1,398 ▲104.23 ▲0.0394.52 ▼13.0241.66 ▼5.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

agoda-affiliate-partners-text-link-generator/agoda-affiliate-textlink-plugin.php 85% from 13 tests

The main file in "Agoda Affiliate Partners Text Link Generator" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("agoda-affiliate-partners-text-link-generator.php" instead of "agoda-affiliate-textlink-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin276 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions11100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings