89% leginda-wp-translate

Code Review | LEGINDA WP Translate

WordPress plugin LEGINDA WP Translate scored89%from 54 tests.

About plugin

  • Plugin page: leginda-wp-translate
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.1.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Apr 24, 2019
  • Number of updates: 16
  • Update frequency: every 56.1 days
  • Top authors: leginda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /988 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.16MB] [CPU: ▼7.98ms] Passed 4 tests

This is a short check of server-side resources used by LEGINDA WP Translate
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.80 ▼1.48
Dashboard /wp-admin3.48 ▲0.1448.53 ▼10.57
Posts /wp-admin/edit.php3.59 ▲0.2447.65 ▲0.57
Add New Post /wp-admin/post-new.php6.06 ▲0.1881.81 ▼20.44
Media Library /wp-admin/upload.php3.40 ▲0.1836.38 ▲2.26
Leginda /wp-admin/admin.php?page=leginda_wp3.3731.64
Pages /wp-admin/admin.php?page=leginda_wp_pages3.4042.86
Widgets /wp-admin/admin.php?page=leginda_wp_widgets3.3729.94
Posts /wp-admin/admin.php?page=leginda_wp_posts3.4034.94
Categories /wp-admin/admin.php?page=leginda_wp_categories3.3832.24

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for LEGINDA WP Translate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.21 ▼1.011.80 ▲0.2139.40 ▲1.36
Dashboard /wp-admin2,245 ▲534.84 ▼0.30103.21 ▼17.1238.81 ▼4.04
Posts /wp-admin/edit.php2,128 ▲362.05 ▲0.0242.84 ▲0.8136.42 ▲0.35
Add New Post /wp-admin/post-new.php1,563 ▲3423.29 ▼0.12655.29 ▼56.6545.61 ▼10.56
Media Library /wp-admin/upload.php1,427 ▲364.24 ▼0.0294.29 ▼5.7440.30 ▼6.84
Leginda /wp-admin/admin.php?page=leginda_wp1,3579.29258.5661.21
Pages /wp-admin/admin.php?page=leginda_wp_pages9851.9728.3731.59
Widgets /wp-admin/admin.php?page=leginda_wp_widgets8381.9124.2124.49
Posts /wp-admin/admin.php?page=leginda_wp_posts9201.9926.0129.33
Categories /wp-admin/admin.php?page=leginda_wp_categories8581.8624.2331.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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: leginda, import, translations, export

leginda-wp-translate/leginda-wp.php 69% from 13 tests

The entry point to "LEGINDA WP Translate" version 1.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: Please prefix the domain path with a forward slash character ("/leginda-wp")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("leginda-wp-translate.php" instead of "leginda-wp.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("leginda-wp")

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
Success! There were no dangerous files found in this plugin3,448 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2115561,604
PHP9263176953
CSS2725509
PO File3129147382

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo.png5.15KB3.88KB▼ 24.69%