78% login-with-amazon

Code Review | Login with Amazon

WordPress plugin Login with Amazon scored78%from 54 tests.

About plugin

  • Plugin page: login-with-amazon
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.0
  • WordPress version: 6.3.1
  • First release: Oct 15, 2015
  • Latest release: Dec 16, 2016
  • Number of updates: 13
  • Update frequency: every 45.9 days
  • Top authors: login-with-amazon (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /4,946 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.08ms] Passed 4 tests

A check of server-side resources used by Login with Amazon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.05 ▼3.19
Dashboard /wp-admin3.37 ▲0.0750.75 ▼2.68
Posts /wp-admin/edit.php3.49 ▲0.1348.08 ▼2.95
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.87 ▼7.51
Media Library /wp-admin/upload.php3.30 ▲0.0642.59 ▲6.60

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
loginwithamazon_client_id
db_upgraded

Browser metrics Passed 4 tests

Login with Amazon: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.33 ▲0.141.64 ▲0.0341.83 ▲1.93
Dashboard /wp-admin2,202 ▲225.51 ▼0.1289.51 ▼4.2643.22 ▲4.71
Posts /wp-admin/edit.php2,113 ▲132.00 ▲0.0335.68 ▼4.8936.00 ▲0.22
Add New Post /wp-admin/post-new.php1,539 ▲1122.87 ▼0.25689.56 ▲56.1862.88 ▲8.23
Media Library /wp-admin/upload.php1,419 ▲194.18 ▼0.10104.71 ▼8.4847.91 ▼1.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • loginwithamazon_client_id
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/login-with-amazon/loginwithamazon.php
    • > /wp-content/plugins/login-with-amazon/source/loginwithamazon/loginwithamazon.php
    • > /wp-content/plugins/login-with-amazon/login_process.php
    • > /wp-content/plugins/login-with-amazon/source/loginwithamazon/login_button.php
    • > /wp-content/plugins/login-with-amazon/login_button.php
    • > /wp-content/plugins/login-with-amazon/source/loginwithamazon/login_process.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/login-with-amazon/source/loginwithamazon/options.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/login-with-amazon/options.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: access, login with amazon, amazon, registration, login...

login-with-amazon/loginwithamazon.php 92% from 13 tests

The main file in "Login with Amazon" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("login-with-amazon.php" instead of "loginwithamazon.php")

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
Good job! No executable or dangerous file extensions detected577 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6169307471
JavaScript362853
Markdown122053

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods42
▷ Static methods42100.00%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin