84% rozetta-translator

Code Review | Rozetta Translator

WordPress plugin Rozetta Translator scored84%from 54 tests.

About plugin

  • Plugin page: rozetta-translator
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-8.0.28
  • WordPress version: 6.3.1
  • First release: Sep 7, 2021
  • Latest release: Dec 1, 2023
  • Number of updates: 16
  • Update frequency: every 52.9 days
  • Top authors: rozettares (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /550 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.25MB] [CPU: ▲1.67ms] Passed 4 tests

Analyzing server-side resources used by Rozetta Translator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2643.04 ▼0.80
Dashboard /wp-admin3.57 ▲0.2749.95 ▲3.46
Posts /wp-admin/edit.php3.69 ▲0.3348.63 ▲1.41
Add New Post /wp-admin/post-new.php6.11 ▲0.2295.87 ▲13.59
Media Library /wp-admin/upload.php3.49 ▲0.2637.78 ▲2.61
Setting /wp-admin/admin.php?page=rozetta-translator3.4532.63
Multilingual /wp-admin/admin.php?page=rozetta-multilingual3.4633.94
Custom Post Type /wp-admin/admin.php?page=rozetta-translator-custom-post-type-setting3.4531.97
Custom Menu CSS /wp-admin/admin.php?page=rozetta-translator-custom-menu-css3.4533.84

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Rozetta Translator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.67 ▲0.401.72 ▲0.1743.43 ▲0.35
Dashboard /wp-admin2,232 ▲545.58 ▼0.0993.44 ▼23.2743.38 ▲0.66
Posts /wp-admin/edit.php2,137 ▲341.97 ▲0.0339.56 ▼5.7435.39 ▼3.58
Add New Post /wp-admin/post-new.php1,569 ▲4324.82 ▲1.97728.40 ▲7.5663.12 ▲11.35
Media Library /wp-admin/upload.php1,437 ▲434.14 ▼0.0697.42 ▼8.8944.33 ▲0.97
Setting /wp-admin/admin.php?page=rozetta-translator8412.1523.8426.82
Multilingual /wp-admin/admin.php?page=rozetta-multilingual8412.0126.1826.36
Custom Post Type /wp-admin/admin.php?page=rozetta-translator-custom-post-type-setting8202.0025.4627.25
Custom Menu CSS /wp-admin/admin.php?page=rozetta-translator-custom-menu-css8282.0023.4226.82

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rozetta-translator/includes/widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rozetta-translator/admin/includes/editor.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rozetta-translator/admin/admin.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rozetta-translator/includes/function.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rozetta-translator/admin/admin.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rozetta-translator/admin/includes/api.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rozetta-translator/admin/includes/post.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Enter your access key, secret key and contract ID.), #2 (Select professional fields and languages in editor.), #3 (Start and wait for the translation to complete, the post content will be substituted with the translated text.)
Please take inspiration from this readme.txt

rozetta-translator/rozetta-translator.php 92% from 13 tests

Analyzing the main PHP file in "Rozetta Translator" version 1.1.1
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "5.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,083 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP11145611,209
JavaScript53911425
PO File113936291
JSON110126
CSS18032

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity17.00
▷ Minimum class complexity10.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1666.67%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions2781.82%
▷ Anonymous functions618.18%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin