78% wp-translate

Code Review | WP Translate - WordPress Translation Plugin

WordPress plugin WP Translate - WordPress Translation Plugin scored78%from 54 tests.

About plugin

  • Plugin page: wp-translate
  • Plugin version: 5.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Feb 6, 2012
  • Latest release: Mar 10, 2021
  • Number of updates: 151
  • Update frequency: every 22.0 days
  • Top authors: hahncgdev (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /238,453 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.33ms] Passed 4 tests

A check of server-side resources used by WP Translate - WordPress Translation Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.10 ▼0.63
Dashboard /wp-admin3.38 ▲0.0749.13 ▲0.10
Posts /wp-admin/edit.php3.49 ▲0.1350.37 ▼0.99
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.22 ▼23.81
Media Library /wp-admin/upload.php3.30 ▲0.0737.34 ▲1.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
wpTranslateOptions
theysaidso_admin_options
widget_recent-comments
widget_wp_translation_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Translate - WordPress Translation Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,959 ▲2,21316.71 ▲2.5274.12 ▲72.0567.94 ▲23.10
Dashboard /wp-admin2,227 ▲444.91 ▼0.04113.02 ▲6.0942.97 ▼0.97
Posts /wp-admin/edit.php2,107 ▲182.14 ▲0.1434.75 ▼1.8734.70 ▲2.25
Add New Post /wp-admin/post-new.php1,537 ▲2323.29 ▲5.85659.00 ▼37.0159.61 ▲4.29
Media Library /wp-admin/upload.php1,409 ▲214.20 ▲0.0299.35 ▼10.8141.60 ▼6.28

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • wpTranslateOptions
    • widget_recent-comments
    • can_compress_scripts
    • widget_wp_translation_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-translate/admin/overview.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-translate/wp-translate.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-translate/classes/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% 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: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-translate/wp-translate.php Passed 13 tests

The entry point to "WP Translate - WordPress Translation Plugin" version 5.3.0 is a PHP file that has certain tags in its header comment area
116 characters long description:
Makes your website available to the world using the powerful Google Translate API to make your content multilingual.

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 plugin1,211 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PO File4332332714
PHP35616450
CSS11047

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.00
▷ Minimum class complexity4.00
▷ Maximum class complexity22.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-256x256.png26.98KB9.37KB▼ 65.27%