10% ultimate-amazon

Code Review | Ultimate Amazon

WordPress plugin Ultimate Amazon scored10%from 54 tests.

About plugin

  • Plugin page: ultimate-amazon
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Sep 23, 2014
  • Latest release: Oct 8, 2014
  • Number of updates: 10
  • Update frequency: every 1.4 days
  • Top authors: tacituslabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,811 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/ultimate-amazon/rnd-product-carousel.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; RND_Product_Caousel has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼60.21ms] Passed 4 tests

Analyzing server-side resources used by Ultimate Amazon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.334.54 ▼37.78
Dashboard /wp-admin2.16 ▼1.155.52 ▼51.76
Posts /wp-admin/edit.php2.16 ▼1.208.16 ▼45.23
Add New Post /wp-admin/post-new.php2.16 ▼3.735.94 ▼106.06
Media Library /wp-admin/upload.php2.16 ▼1.075.26 ▼30.63
Add New Item /wp-admin/post-new.php?post_type=carousel2.168.09
Carousels /wp-admin/options-general.php?page=carousel-slider/carousel-options.php2.166.50
All Items /wp-admin/edit.php?post_type=carousel2.164.63

Server storage [IO: ▲0.89MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • There were 2 files (0.00KB) illegally modified outside of "wp-content/plugins/ultimate-amazon/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/ultimate-amazon/assets/banner-772\303\227250.png"
    • (new file) "wp-content/plugins/ultimate-amazon/assets/banner-1544\303\227500.png"
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
sis_carousel_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Ultimate Amazon
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲21113.66 ▼0.708.47 ▲6.8738.52 ▼2.32
Dashboard /wp-admin2,273 ▲994.92 ▼0.7197.20 ▲3.1990.02 ▲49.01
Posts /wp-admin/edit.php2,181 ▲782.31 ▲0.3635.50 ▼1.0634.97 ▲1.39
Add New Post /wp-admin/post-new.php1,592 ▲6123.44 ▲0.03750.85 ▲92.7736.27 ▼16.53
Media Library /wp-admin/upload.php1,481 ▲814.42 ▲0.32104.41 ▼1.0470.94 ▲24.76
Add New Item /wp-admin/post-new.php?post_type=carousel2,3937.85177.91149.65
Carousels /wp-admin/options-general.php?page=carousel-slider/carousel-options.php280.420.084.23
All Items /wp-admin/edit.php?post_type=carousel1,1562.2535.9932.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/ultimate-amazon/rnd-product-carousel.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; RND_Product_Caousel has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=carousel
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/ultimate-amazon/rnd-product-carousel.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; RND_Product_Caousel has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-amazon/rnd-product-carousel.php on line 11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/ultimate-amazon/rnd-product-carousel.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/image.php' (include_path='.:/usr/share/php') in wp-content/plugins/ultimate-amazon/rnd-product-carousel.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-amazon/carousel-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-amazon/templates/settings.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-amazon/carousel-img-type.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-amazon/carousel.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-amazon/templates/shortcode.php:57

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=carousel
    • > Network (severe)
    wp-content/plugins/carousel-slider/images/icon16X16.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=carousel-slider/carousel-options.php
    • > Network (severe)
    wp-admin/options-general.php?page=carousel-slider/carousel-options.php - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (HTML5 Retina and touch-capable carousel from Ultimate Amazon.) image missing
You can look at the official readme.txt

ultimate-amazon/rnd-product-carousel.php 85% from 13 tests

"Ultimate Amazon" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ultimate-amazon.php" instead of "rnd-product-carousel.php")
  • Description: The description should be shorter than 140 characters (currently 686 characters long)

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
There were no executable files found in this plugin2,579 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3213181,320
PHP10171213965
CSS31935294

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity20.50
▷ Minimum class complexity5.00
▷ Maximum class complexity36.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 1.10MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png654.58KB181.26KB▼ 72.31%
images/icon16X16.png0.58KB0.49KB▼ 16.02%
assets/banner-772×250.png308.27KB86.84KB▼ 71.83%
(invalid) assets/banner-1544×500.png161.72KB0.00KB▼ 100.00%
js/carousel.png0.21KB0.13KB▼ 37.90%