78% amazon-master

Code Review | TechGasp Amazing Master

WordPress plugin TechGasp Amazing Master scored 78% from 54 tests.

About plugin

  • Plugin page: amazon-master
  • Plugin version: 5.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Dec 8, 2013
  • Latest release: Mar 11, 2021
  • Number of updates: 51
  • Update frequency: every 52.0 days
  • Top authors: TechGasp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 12,616 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by TechGasp Amazing Master
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.23 ▲1.35
Dashboard /wp-admin3.33 ▲0.0345.52 ▼9.04
Posts /wp-admin/edit.php3.38 ▲0.0249.33 ▲5.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.82 ▼10.24
Media Library /wp-admin/upload.php3.25 ▲0.0234.65 ▼1.98
Add-ons /wp-admin/admin.php?page=amazon-master-admin-addons3.2831.89
Amazing Master /wp-admin/admin.php?page=amazon-master3.2531.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_amazon_master_widget_deals
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_amazon_master_widget_buttons

Browser metrics Passed 4 tests

This is an overview of browser requirements for TechGasp Amazing Master
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6913.22 ▼1.531.67 ▼0.6044.30 ▼4.05
Dashboard /wp-admin2,235 ▲474.94 ▲0.0499.87 ▼17.4085.18 ▲40.42
Posts /wp-admin/edit.php2,115 ▲292.04 ▲0.0339.53 ▲2.9734.44 ▲4.44
Add New Post /wp-admin/post-new.php1,543 ▲1023.52 ▲0.15691.07 ▲43.3550.64 ▼4.06
Media Library /wp-admin/upload.php1,411 ▲234.11 ▼0.1794.93 ▼5.9467.37 ▲21.79
Add-ons /wp-admin/admin.php?page=amazon-master-admin-addons9962.1922.4532.53
Amazing Master /wp-admin/admin.php?page=amazon-master1,7698.39205.3195.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_amazon_master_widget_deals
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_amazon_master_widget_buttons
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/amazon-master/includes/amazon-master-admin-addons.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amazon-master/includes/amazon-master-widget-buttons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/amazon-master/includes/amazon-master-admin-table-news.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/amazon-master/amazon-master.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amazon-master/includes/amazon-master-widget-amazon-deals.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/amazon-master/includes/amazon-master-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/amazon-master/includes/amazon-master-admin-addons-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/amazon-master/includes/amazon-master-admin-table-header.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=amazon-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=amazon-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/admin.php?page=amazon-master
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/y-/r/e_Kj5Xrx7lO.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=amazon-master
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/y-/r/e_Kj5Xrx7lO.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

amazon-master/amazon-master.php Passed 13 tests

The primary PHP file in "TechGasp Amazing Master" version 5.1.4 is used by WordPress to initiate all plugin functionality
135 characters long description:
TechGasp Amazing Master let's you can automatically display the hottest deals from Amazon making your wordpress a money making machine.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected480 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP103166480

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.29MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/techgasp-admin-addons-updater.png14.03KB13.02KB▼ 7.21%
images/techgasp-amazon-button.png5.30KB2.49KB▼ 53.07%
images/techgasp-admin-addons-widgets.png17.08KB16.02KB▼ 6.22%
images/techgasp-check-no.png21.14KB7.14KB▼ 66.23%
images/techgasp-minilogo-16.png1.86KB0.92KB▼ 50.87%