84% gp-aws-translate

Code Review | GlotPress Amazon Translate Plugin

WordPress plugin GlotPress Amazon Translate Plugin scored84%from 54 tests.

About plugin

  • Plugin page: gp-aws-translate
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2019
  • Latest release: Jun 7, 2019
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: mnchga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /655 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲11.99MB] [CPU: ▲24.04ms] 75% from 4 tests

An overview of server-side resources used by GlotPress Amazon Translate Plugin
The following require your attention
  • Extra RAM: The extra memory usage must be under 5MB (currently 11.99MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /15.98 ▲12.5281.70 ▲39.90
Dashboard /wp-admin16.00 ▲12.6989.01 ▲38.91
Posts /wp-admin/edit.php16.00 ▲12.6484.77 ▲38.65
Add New Post /wp-admin/post-new.php16.00 ▲10.1171.79 ▼21.12
Media Library /wp-admin/upload.php16.00 ▲12.7773.17 ▲39.72

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by GlotPress Amazon Translate Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.36 ▼1.021.65 ▼0.0467.16 ▲22.04
Dashboard /wp-admin2,219 ▲285.83 ▼0.0497.45 ▼2.8237.20 ▼8.30
Posts /wp-admin/edit.php2,102 ▲131.99 ▼0.0438.25 ▲0.4231.88 ▼1.39
Add New Post /wp-admin/post-new.php1,526 ▲1217.43 ▼0.19679.98 ▲18.7752.28 ▼8.40
Media Library /wp-admin/upload.php1,404 ▲134.22 ▲0.0093.52 ▼2.7541.35 ▼1.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gp-aws-translate/includes/_options.php
    • > /wp-content/plugins/gp-aws-translate/includes/_constants.php
    • > /wp-content/plugins/gp-aws-translate/gp-aws-translate.php
    • > /wp-content/plugins/gp-aws-translate/includes/settings_page.php
    • > /wp-content/plugins/gp-aws-translate/gp-extensions/gp_aws_frontend.php
    • > /wp-content/plugins/gp-aws-translate/gp-extensions/gp_aws_api_controller.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: suggestions, amazon translate, glotpress

gp-aws-translate/gp-aws-translate.php 92% from 13 tests

The main PHP script in "GlotPress Amazon Translate Plugin" version 1.1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin271 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP64212250
Markdown16021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants1
▷ Global constants1100.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
No PNG files were detected