84% affiliate-product-review

Code Review | Affiliate Product Review

WordPress plugin Affiliate Product Review scored84%from 54 tests.

About plugin

  • Plugin page: affiliate-product...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 22, 2022
  • Latest release: Apr 24, 2022
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: nazmunsakib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,437 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.41MB] [CPU: ▲2.42ms] Passed 4 tests

Analyzing server-side resources used by Affiliate Product Review
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.92 ▲1.4545.13 ▲4.66
Dashboard /wp-admin4.74 ▲1.4063.63 ▼2.27
Posts /wp-admin/edit.php4.82 ▲1.4766.79 ▲19.82
Add New Post /wp-admin/post-new.php7.29 ▲1.4092.77 ▼10.06
Media Library /wp-admin/upload.php4.60 ▲1.3853.58 ▲17.36

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 161 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Affiliate Product Review
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.26 ▼1.034.84 ▲3.1139.74 ▼5.11
Dashboard /wp-admin2,206 ▲155.85 ▲0.96119.06 ▲8.6242.89 ▲0.42
Posts /wp-admin/edit.php2,284 ▲1983.63 ▲1.6280.48 ▲44.7135.76 ▲0.73
Add New Post /wp-admin/post-new.php6,576 ▲5,06228.99 ▲11.37966.01 ▲344.7340.66 ▼24.35
Media Library /wp-admin/upload.php1,391 ▲34.14 ▼0.0980.40 ▼19.2541.36 ▼0.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • apr_isntalled
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • apr_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/affiliate-product-review/include/Frontend/Review.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: product review, review, product, affiliate

affiliate-product-review/affiliate-product-review.php 92% from 13 tests

The main PHP script in "Affiliate Product Review" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin38,913 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PO File203,1983,5916,500

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity24.78
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity6.88
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes11.61%
▷ Static methods4316.60%
▷ Public methods25899.61%
▷ Protected methods00.00%
▷ Private methods10.39%
▷ Named functions24100.00%
▷ Anonymous functions00.00%
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings