90% my-wp-translate

Code Review | My WP Translate

WordPress plugin My WP Translate scored90%from 54 tests.

About plugin

  • Plugin page: my-wp-translate
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Dec 1, 2015
  • Latest release: Jan 26, 2022
  • Number of updates: 35
  • Update frequency: every 64.6 days
  • Top authors: MyThemeShop (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

10,000+ active /214,865 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
Installer ran successfully

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

Analyzing server-side resources used by My WP Translate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0649.10 ▲10.57
Dashboard /wp-admin3.35 ▲0.0053.08 ▼6.64
Posts /wp-admin/edit.php3.40 ▲0.0454.71 ▲9.38
Add New Post /wp-admin/post-new.php5.93 ▲0.04115.97 ▲17.07
Media Library /wp-admin/upload.php3.27 ▲0.0452.09 ▲16.16

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
mtswpt_translations
theysaidso_admin_options
mtswpt_domains
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

My WP Translate: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲7013.17 ▼1.182.07 ▲0.1942.65 ▲1.24
Dashboard /wp-admin2,222 ▲344.91 ▼0.04100.90 ▲1.6737.76 ▼5.37
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0833.35 ▼3.4032.58 ▼1.94
Add New Post /wp-admin/post-new.php1,534 ▲1522.94 ▼0.36653.68 ▼19.6853.80 ▼10.50
Media Library /wp-admin/upload.php1,404 ▲134.28 ▲0.10114.37 ▲10.3147.41 ▲4.34

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: translate, theme translate, translator, wordpress translator, theme translator...

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

"My WP Translate" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
126 characters long description:
Simple yet powerful Translate plugin for WordPress. Can be used with most of the themes and plugins which support translation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,569 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP103947191,177
JavaScript110312335
CSS10457

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity37.00
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods53
▷ Static methods35.66%
▷ Public methods4584.91%
▷ Protected methods47.55%
▷ Private methods47.55%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin