10% simple-google-translate-widget

Code Review | Simple Google Translate Widget

WordPress plugin Simple Google Translate Widget scored10%from 54 tests.

About plugin

  • Plugin page: simple-google-tra...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-5.8
  • WordPress version: 6.3.1
  • First release: Dec 10, 2014
  • Latest release: Jul 25, 2021
  • Number of updates: 10
  • Update frequency: every 241.9 days
  • Top authors: baynado (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,973 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
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/simple-google-translate-widget/simple-google-translate.php+42
    mail(): headers parameter must be string or array

Server metrics [RAM: ▼1.90MB] [CPU: ▼53.34ms] Passed 4 tests

A check of server-side resources used by Simple Google Translate Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.388.90 ▼33.13
Dashboard /wp-admin2.10 ▼1.2011.69 ▼42.51
Posts /wp-admin/edit.php2.10 ▼1.259.38 ▼45.46
Add New Post /wp-admin/post-new.php2.10 ▼3.7810.87 ▼92.25
Media Library /wp-admin/upload.php2.10 ▼1.1210.21 ▼24.78

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: 1 new table, 6 new options
New tables
wp_sc_log
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Simple Google Translate Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.27 ▲0.011.66 ▼0.3037.76 ▼10.50
Dashboard /wp-admin2,192 ▲155.60 ▲0.0283.53 ▼21.6743.51 ▼1.00
Posts /wp-admin/edit.php2,082 ▼181.99 ▼0.0834.57 ▼3.2339.13 ▲1.16
Add New Post /wp-admin/post-new.php1,528 ▼623.12 ▲4.99658.08 ▲41.3656.83 ▼19.70
Media Library /wp-admin/upload.php1,397 ▼04.19 ▼0.02102.56 ▲2.8443.72 ▼1.03

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× 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/simple-google-translate-widget/simple-google-translate.php:191

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: You are using too many tags: 26 tag instead of maximum 10
The official readme.txt might help

simple-google-translate-widget/simple-google-translate.php 92% from 13 tests

The principal PHP file in "Simple Google Translate Widget" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-google-translate-widget.php" instead of "simple-google-translate.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin159 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15010144
CSS12015

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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