78% review-engine

Code Review | Affiliate Link Builder Plugin for Amazon Associates - Review Engine

WordPress plugin Affiliate Link Builder Plugin for Amazon Associates - Review Engine scored 78% from 54 tests.

About plugin

  • Plugin page: review-engine
  • Plugin version: 1.0.41
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 5.9.2
  • First release: Jul 30, 2018
  • Latest release: Jul 30, 2018
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: cloudliving (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 1,596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.99MB] [CPU: ▼293.60ms] Passed 4 tests

A check of server-side resources used by Affiliate Link Builder Plugin for Amazon Associates - Review Engine
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.36 ▲3.8574.03 ▲22.63
Dashboard /wp-admin7.38 ▲3.9756.00 ▲22.95
Posts /wp-admin/edit.php7.38 ▲3.7456.91 ▲20.47
Add New Post /wp-admin/post-new.php7.38 ▲0.4146.50 ▼1,233.51
Media Library /wp-admin/upload.php7.38 ▲4.0841.30 ▲16.01
Freemius Debug [v.2.1.2] /wp-admin/admin.php?page=freemius7.3841.50

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 260 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_debug_mode
fs_accounts
fs_gdpr

Browser metrics Passed 4 tests

This is an overview of browser requirements for Affiliate Link Builder Plugin for Amazon Associates - Review Engine
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,962 ▲21816.26 ▲0.5710.82 ▲4.222.26 ▼0.24
Dashboard /wp-admin2,941 ▲876.07 ▼0.13118.79 ▼30.49165.74 ▲3.32
Posts /wp-admin/edit.php2,747 ▲563.25 ▲0.0165.22 ▲2.94154.25 ▲10.15
Add New Post /wp-admin/post-new.php1,721 ▼3120.28 ▼1.47424.56 ▼12.00171.82 ▲11.68
Media Library /wp-admin/upload.php1,754 ▲565.55 ▲0.04145.08 ▼0.28203.05 ▲16.49
Freemius Debug [v.2.1.2] /wp-admin/admin.php?page=freemius1,4502.4955.10126.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 5 options
    • fs_active_plugins
    • fs_api_cache
    • fs_gdpr
    • fs_accounts
    • fs_debug_mode

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/review-engine/includes/vendor/freemius-sdk/templates/ajax-loader.php
  • 21× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/review-engine/includes/display/link/views/content.php:2
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/review-engine/includes/shortcodes/button/frontend.css.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/review-engine/includes/modal-types/insert/views/content.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/review-engine/includes/display/button/views/content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/review-engine/includes/display/image/views/content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/review-engine/includes/metabox/views/content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_settings_sections() in wp-content/plugins/review-engine/includes/settings-tabs/general/views/content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/review-engine/includes/settings/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/review-engine/includes/vendor/freemius-sdk/templates/partials/network-activation.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/review-engine/includes/vendor/freemius-sdk/templates/account/partials/addon.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: amazon, amazon associates, affiliate link builder, affiliate, affiliate marketing

review-engine/reviewengine.php 85% from 13 tests

The primary PHP file in "Affiliate Link Builder Plugin for Amazon Associates - Review Engine" version 1.0.41 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("review-engine.php" instead of "reviewengine.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected44,677 lines of code in 211 files:
LanguageFilesBlank linesComment linesLines of code
PHP1316,73314,03028,278
PO File94,2164,9449,156
SVG1002,671
Sass25390772,443
JavaScript182771251,385
CSS218635465
Markdown2680214
JSON20037
YAML22028

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,244)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity58.33
▷ Minimum class complexity1.00
▷ Maximum class complexity2,244.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes61
▷ Abstract classes23.28%
▷ Concrete classes5996.72%
▷ Final classes11.69%
Methods1,150
▷ Static methods26623.13%
▷ Public methods81771.04%
▷ Protected methods151.30%
▷ Private methods31827.65%
Functions117
▷ Named functions117100.00%
▷ Anonymous functions00.00%
Constants133
▷ Global constants11384.96%
▷ Class constants2015.04%
▷ Public constants20100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/vendor/freemius-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
includes/vendor/freemius-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/vendor/freemius-sdk/assets/img/reviewengine.png9.16KB5.26KB▼ 42.58%