84% translate-words

Code Review | Translate Words

WordPress plugin Translate Words scored84%from 54 tests.

About plugin

  • Plugin page: translate-words
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Apr 30, 2021
  • Latest release: Mar 5, 2023
  • Number of updates: 14
  • Update frequency: every 48.2 days
  • Top authors: BinaryMoon (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

2,000+ active /9,612 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.97ms] Passed 4 tests

This is a short check of server-side resources used by Translate Words
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.12 ▲5.38
Dashboard /wp-admin3.34 ▲0.0446.18 ▼3.52
Posts /wp-admin/edit.php3.39 ▲0.0446.68 ▼3.56
Add New Post /wp-admin/post-new.php5.92 ▲0.04101.85 ▲13.83
Media Library /wp-admin/upload.php3.27 ▲0.0442.09 ▲9.59
Translate Words /wp-admin/options-general.php?page=tww_settings3.2332.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Translate Words
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.44 ▲0.061.89 ▲0.2242.90 ▲1.96
Dashboard /wp-admin2,210 ▲255.83 ▼0.0599.72 ▼0.7540.16 ▼3.48
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0036.21 ▼2.2834.36 ▼6.76
Add New Post /wp-admin/post-new.php1,516 ▼2617.63 ▼0.37656.91 ▲21.9263.71 ▲4.62
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.03102.94 ▼11.5046.20 ▼0.12
Translate Words /wp-admin/options-general.php?page=tww_settings8152.0526.0128.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/translate-words/includes/frontend.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/translate-words/includes/administration.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: ngettext, gettext, translate, string translations

translate-words/translate-wp-words.php 92% from 13 tests

The main file in "Translate Words" v. 1.2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("translate-words.php" instead of "translate-wp-words.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
Good job! No executable or dangerous file extensions detected255 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38697207
JavaScript221148

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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 are no PNG files in this plugin