10% yaawp

Code Review | Yet Another Amazon Wordpress Plugin Lite

WordPress plugin Yet Another Amazon Wordpress Plugin Lite scored10%from 54 tests.

About plugin

  • Plugin page: yaawp
  • Plugin version: 0.87
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Feb 10, 2013
  • Latest release: Jan 16, 2014
  • Number of updates: 40
  • Update frequency: every 9.0 days
  • Top authors: Klange (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /5,295 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
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

Server metrics [RAM: ▼1.49MB] [CPU: ▼55.15ms] Passed 4 tests

Server-side resources used by Yet Another Amazon Wordpress Plugin Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.54 ▼0.967.84 ▼35.95
Dashboard /wp-admin2.56 ▼0.7910.27 ▼52.06
Posts /wp-admin/edit.php2.56 ▼0.8410.41 ▼40.01
Add New Post /wp-admin/post-new.php2.56 ▼3.377.97 ▼92.57
Media Library /wp-admin/upload.php2.56 ▼0.717.61 ▼30.08
Kategorien /wp-admin/edit-tags.php?taxonomy=shop_category&post_type=shop2.567.71
Einstellungen /wp-admin/edit.php?post_type=shop&page=yaawp-einstellungen2.569.69
Produkte /wp-admin/edit.php?post_type=shop2.567.55
Import /wp-admin/edit.php?post_type=shop&page=yaawp-import2.567.70
Erstellen /wp-admin/post-new.php?post_type=shop2.567.78

Server storage [IO: ▲0.49MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 56 new files
Database: 1 new table, 10 new options
New tables
wp_yaawp_nodes
New WordPress options
yaawp_product_number
db_upgraded
yaawp_db_version
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
yaawp_product_layout
widget_recent-comments
yaawp_cron_check

Browser metrics Passed 4 tests

A check of browser resources used by Yet Another Amazon Wordpress Plugin Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲17813.52 ▼0.868.56 ▲6.5938.66 ▼5.80
Dashboard /wp-admin2,238 ▲585.65 ▲0.0686.23 ▼3.2076.85 ▲42.30
Posts /wp-admin/edit.php2,158 ▲582.22 ▲0.2338.62 ▲2.3334.26 ▼0.74
Add New Post /wp-admin/post-new.php1,717 ▲18721.17 ▼1.92769.02 ▲85.2829.94 ▼26.83
Media Library /wp-admin/upload.php1,451 ▲514.37 ▲0.18103.99 ▲3.5874.80 ▲31.06
Kategorien /wp-admin/edit-tags.php?taxonomy=shop_category&post_type=shop1,3861.9931.6234.07
Einstellungen /wp-admin/edit.php?post_type=shop&page=yaawp-einstellungen8791.9229.5726.51
Produkte /wp-admin/edit.php?post_type=shop1,1492.1535.5133.38
Import /wp-admin/edit.php?post_type=shop&page=yaawp-import1,1291.8429.2528.37
Erstellen /wp-admin/post-new.php?post_type=shop2,4647.81173.39118.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=shop
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/yaawp/templates/backend/import_table.php
    • > /wp-content/plugins/yaawp/ajax.php
    • > /wp-content/plugins/yaawp/popup.php
  • 19× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/yaawp/templates/frontend/product/product2.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yaawp/templates/backend/yaawp-admin_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/yaawp/templates/backend/yaawp-admin_cat.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/yaawp/templates/frontend/archive.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/yaawp/yaawp_lite.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yaawp/templates/backend/template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/yaawp/templates/frontend/product/product3.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yaawp/templates/backend/import.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yaawp/templates/backend/yaawp-admin_setup.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yaawp/templates/backend/yaawp-admin_sta.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=shop
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/yaawp/assets/js/admin.js?ver=0.69:10:19)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:27292)" undefined
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=shop
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === yaawp === )
Please take inspiration from this readme.txt

yaawp/yaawp_lite.php 85% from 13 tests

This is the main PHP file of "Yet Another Amazon Wordpress Plugin Lite" version 0.87, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yaawp.php" instead of "yaawp_lite.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 531 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected5,238 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,0311433,759
JavaScript32681540
CSS3925514
PO File1191249425

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity88.75
▷ Minimum class complexity7.00
▷ Maximum class complexity206.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods92
▷ Static methods33.26%
▷ Public methods5761.96%
▷ Protected methods3032.61%
▷ Private methods55.43%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants49
▷ Global constants49100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.20MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/yaawp.png0.55KB0.53KB▼ 3.55%
assets/img/HeCoSep.png0.14KB0.11KB▼ 21.92%
assets/img/social/_csg-512c5ec66d685.png38.66KB7.62KB▼ 80.30%
assets/img/promo.png4.55KB1.15KB▼ 74.74%
assets/img/list-default-thumb.png0.87KB0.60KB▼ 30.84%