84% fast-translate

Code Review | Fast Translate

WordPress plugin Fast Translate scored84%from 54 tests.

About plugin

  • Plugin page: fast-translate
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Jun 23, 2017
  • Latest release: Dec 12, 2019
  • Number of updates: 9
  • Update frequency: every 100.3 days
  • Top authors: greencp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.58ms] Passed 4 tests

Server-side resources used by Fast Translate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.82 ▼0.02
Dashboard /wp-admin3.31 ▲0.0146.86 ▼4.92
Posts /wp-admin/edit.php3.43 ▲0.0746.64 ▼5.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.14 ▼11.55
Media Library /wp-admin/upload.php3.24 ▲0.0136.21 ▲0.42

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

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

Browser metrics Passed 4 tests

Fast Translate: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.081.67 ▲0.0142.19 ▲1.39
Dashboard /wp-admin2,192 ▲155.56 ▼0.1382.15 ▼8.8136.39 ▼6.60
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0139.99 ▲3.4636.41 ▼0.49
Add New Post /wp-admin/post-new.php1,530 ▲423.35 ▲0.32614.77 ▼32.4257.82 ▲14.56
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.0794.07 ▼10.4142.98 ▼3.18

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext_Translations' not found in wp-content/plugins/fast-translate/class.wppp_mo_dynamic.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext_Translations' not found in wp-content/plugins/fast-translate/class.wppp_mo_dynamic.php:44

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: translation, speed, mo, l10n, translate...

fast-translate/fast-translate.php Passed 13 tests

This is the main PHP file of "Fast Translate" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
Faster WordPress localization with cache support.

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
No dangerous file extensions were detected520 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29077520

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity40.33
▷ Minimum class complexity2.00
▷ Maximum class complexity108.00
Average method complexity4.68
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2180.77%
▷ Protected methods13.85%
▷ Private methods415.38%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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