10% gothamazon

Code Review | GothAmazon

WordPress plugin GothAmazonscored 10% from 54 tests.

About plugin

  • Plugin page: gothamazon
  • Plugin version: 2.5.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Aug 8, 2020
  • Latest release: Apr 5, 2022
  • Number of updates: 100
  • Update frequency: every 6.1 days
  • Top authors: gothamdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,950 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/gothamazon/inc/valid_api.php+85
    Trying to access array offset on value of type null

Server metrics [RAM: ▲0.34MB] [CPU: ▲209.60ms] 75% from 4 tests

This is a short check of server-side resources used by GothAmazon
It is recommended to improve the following
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 209.60ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.34360.16 ▲280.42
Dashboard /wp-admin3.76 ▲0.35675.82 ▲625.85
Posts /wp-admin/edit.php3.99 ▲0.34802.07 ▲759.65
Add New Post /wp-admin/post-new.php7.28 ▲0.31734.72 ▼622.35
Media Library /wp-admin/upload.php3.71 ▲0.41586.93 ▲554.46

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 47 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for GothAmazon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,018 ▲29616.24 ▲0.6211.54 ▲2.203.50 ▲0.48
Dashboard /wp-admin3,121 ▲2057.26 ▲0.86183.24 ▼19.04199.08 ▼3.99
Posts /wp-admin/edit.php2,889 ▲1683.74 ▲0.3192.03 ▲6.13193.67 ▼9.32
Add New Post /wp-admin/post-new.php1,650 ▲3818.67 ▼3.07602.69 ▼31.81209.36 ▼18.58
Media Library /wp-admin/upload.php1,897 ▲1676.02 ▲0.29167.54 ▼21.06234.15 ▼8.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 46× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: zipq in wp-content/plugins/gothamazon/eco_asin.php on line 122
    • > PHP Notice
      Undefined variable: marketplace in wp-content/plugins/gothamazon/eco.php on line 6
    • > PHP Notice
      Undefined variable: categoryprecise in wp-content/plugins/gothamazon/eco.php on line 55
    • > PHP Notice
      Undefined variable: marque in wp-content/plugins/gothamazon/eco.php on line 36
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/gothamazon/inc/vmob.php on line 22
    • > PHP Notice
      Undefined variable: parachute in wp-content/plugins/gothamazon/eco_asin.php on line 200
    • > PHP Notice
      Undefined variable: amazontrackingcode in wp-content/plugins/gothamazon/eco_asin.php on line 131
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/gothamazon/inc/vmob.php on line 10
    • > PHP Notice
      Undefined variable: secret_amalog in wp-content/plugins/gothamazon/eco_asin.php on line 32
    • > PHP Notice
      Undefined variable: parachute in wp-content/plugins/gothamazon/eco.php on line 134

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

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === GothAmazon=== )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.png. Note that the screenshot is taken from the directory that contains the stable readme.txt.), #2 (This screen shot description corresponds to screenshot-2.png. Note that the screenshot is taken from the directory that contains the stable readme.txt.), #3 (This screen shot description corresponds to screenshot-3.png. Note that the screenshot is taken from the directory that contains the stable readme.txt.), #4 (This screen shot description corresponds to screenshot-4.png. Note that the screenshot is taken from the directory that contains the stable readme.txt.), #5 (This screen shot description corresponds to screenshot-5.png. Note that the screenshot is taken from the directory that contains the stable readme.txt.), #6 (This screen shot description corresponds to screenshot-6.png. Note that the screenshot is taken from the directory that contains the stable readme.txt.)
The official readme.txt might help

gothamazon/gothamzone.php 85% from 13 tests

The main file in "GothAmazon" v. 2.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.2.4" instead of "7.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("gothamazon.php" instead of "gothamzone.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin8,293 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP182,1193525,577
JavaScript682222,708
SVG2008

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity54.25
▷ Minimum class complexity3.00
▷ Maximum class complexity92.00
Average method complexity8.61
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2071.43%
▷ Protected methods00.00%
▷ Private methods828.57%
Functions42
▷ Named functions3890.48%
▷ Anonymous functions49.52%
Constants6
▷ Global constants6100.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
15 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/fnac.png3.03KB2.09KB▼ 31.25%
img/45rate.png2.01KB0.62KB▼ 69.45%
img/manomano.png3.21KB2.26KB▼ 29.46%
img/nopics.png3.95KB2.66KB▼ 32.62%
img/boulanger.png2.85KB1.92KB▼ 32.55%