83% automatic-translate-addon-for-translatepress

Code Review | Automatic Translate Addon For TranslatePress

WordPress plugin Automatic Translate Addon For TranslatePress scored83%from 54 tests.

About plugin

  • Plugin page: automatic-transla...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0+
  • WordPress version: 6.3.1
  • First release: Jan 21, 2021
  • Latest release: Aug 21, 2023
  • Number of updates: 35
  • Update frequency: every 27.0 days
  • Top authors: coolplugins (100%)

Code review

54 tests

User reviews

53 reviews

Install metrics

5,000+ active /37,472 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.12MB] [CPU: ▼1.36ms] Passed 4 tests

Analyzing server-side resources used by Automatic Translate Addon For TranslatePress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.46 ▲1.32
Dashboard /wp-admin3.44 ▲0.1345.05 ▼1.35
Posts /wp-admin/edit.php3.55 ▲0.1945.83 ▼1.45
Add New Post /wp-admin/post-new.php6.02 ▲0.1380.52 ▼3.97
Media Library /wp-admin/upload.php3.36 ▲0.1338.29 ▲4.37
TranslatePress - Auto Translate Addon /wp-admin/options-general.php?page=translatepress-tpap-register3.3331.47

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 10 new options
New WordPress options
tpa-ratingDiv
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
tpa-v
tpa-type
tpa-installDate
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Automatic Translate Addon For TranslatePress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.18 ▼1.501.65 ▼0.2539.63 ▼4.51
Dashboard /wp-admin2,222 ▲304.93 ▲0.05111.82 ▲5.7640.25 ▼2.47
Posts /wp-admin/edit.php2,104 ▲152.05 ▲0.0237.69 ▼4.7634.17 ▼2.23
Add New Post /wp-admin/post-new.php1,529 ▼417.54 ▼5.50682.77 ▲12.5350.74 ▼13.23
Media Library /wp-admin/upload.php1,401 ▲134.18 ▲0.02110.87 ▲2.3546.64 ▼1.93
TranslatePress - Auto Translate Addon /wp-admin/options-general.php?page=translatepress-tpap-register9712.0123.9583.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • tpa-ratingDiv
    • can_compress_scripts
    • theysaidso_admin_options
    • tpa-installDate
    • db_upgraded
    • tpa-v
    • widget_recent-posts
    • tpa-type

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | 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
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant TPA_VERSION - assumed 'TPA_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/automatic-translate-addon-for-translatepress/admin/feedback/admin-feedback-form.php on line 166
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TPA\\feedback\\plugin_dir_url() in wp-content/plugins/automatic-translate-addon-for-translatepress/admin/feedback/admin-feedback-form.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-translate-addon-for-translatepress/admin/tpap-register/tpap-admin-menu.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

automatic-translate-addon-for-translatepress/automatic-translate-addon-for-translatepress.php 69% from 13 tests

The main PHP script in "Automatic Translate Addon For TranslatePress" version 1.0.3 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Keep the plugin description shorter than 140 characters (currently 175 characters long)
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

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
Good job! No executable or dangerous file extensions detected2,358 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS31023878
JavaScript32662870
PHP44084610

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.75
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/coolplugins-logo.png8.40KB3.14KB▼ 62.61%
assets/images/powered-by-yandex.png1.83KB1.87KB0.00%
assets/images/tpa-icon.png48.51KB4.74KB▼ 90.22%
assets/images/powered-by-google.png2.19KB2.21KB0.00%