74% autoglot

Code Review | Autoglot - Automatic Wordpress Translation

WordPress plugin Autoglot - Automatic Wordpress Translation scored74%from 54 tests.

About plugin

  • Plugin page: autoglot
  • Plugin version: 1.5.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 1, 2021
  • Latest release: Dec 1, 2023
  • Number of updates: 78
  • Update frequency: every 11.3 days
  • Top authors: autoglot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /5,894 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.97MB] [CPU: ▲3.95ms] Passed 4 tests

Server-side resources used by Autoglot - Automatic Wordpress Translation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.43 ▲0.9645.36 ▲2.82
Dashboard /wp-admin4.29 ▲0.9458.81 ▼4.39
Posts /wp-admin/edit.php4.34 ▲0.9863.10 ▲15.96
Add New Post /wp-admin/post-new.php6.89 ▲1.0095.07 ▲1.39
Media Library /wp-admin/upload.php4.21 ▲0.9852.54 ▲18.81

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: 1 new table, 7 new options
New tables
wp_autoglot_translations
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
autoglot_db_version
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Autoglot - Automatic Wordpress Translation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.30 ▲0.031.66 ▼0.0637.59 ▼6.94
Dashboard /wp-admin2,232 ▲555.64 ▲0.0497.31 ▼6.7041.85 ▼6.21
Posts /wp-admin/edit.php2,140 ▲402.02 ▲0.0541.85 ▲3.1934.90 ▲2.55
Add New Post /wp-admin/post-new.php1,545 ▲923.30 ▲0.15607.20 ▼27.2856.60 ▼7.07
Media Library /wp-admin/upload.php1,440 ▲404.22 ▲0.0496.46 ▲0.8142.33 ▲0.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_autoglot_translations
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • autoglot_db_version
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/autoglot/admin/partials/display_setup.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/autoglot/admin/partials/display_utilities.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/autoglot/admin/partials/display_settings.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/autoglot/admin/partials/display_dashboard.php:16

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

autoglot/autoglot.php Passed 13 tests

The main file in "Autoglot - Automatic Wordpress Translation" v. 1.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
115 characters long description:
Autoglot Wordpress Translation Plugin - fully automatic SEO-friendly plugin for multilingual Wordpress translation.

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 plugin11,866 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PO File61,6373,2826,877
PHP166881,0423,397
CSS4230151,493
JavaScript2334999

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity59.70
▷ Minimum class complexity1.00
▷ Maximum class complexity212.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods149
▷ Static methods2416.11%
▷ Public methods14496.64%
▷ Protected methods00.00%
▷ Private methods53.36%
Functions16
▷ Named functions00.00%
▷ Anonymous functions16100.00%
Constants60
▷ Global constants5388.33%
▷ Class constants711.67%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.33MB with 0.24MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
front/img/flags_sprites.png215.12KB60.99KB▼ 71.65%
front/img/smallflags_sprites.png118.60KB29.30KB▼ 75.30%