83% ipros24-google-translate-widget

Code Review | iPROS24 Google Translate widget

WordPress plugin iPROS24 Google Translate widget scored 83% from 54 tests.

About plugin

  • Plugin page: ipros24-google-tr...
  • Plugin version: 1.12.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Aug 19, 2017
  • Latest release: May 21, 2020
  • Number of updates: 17
  • Update frequency: every 59.3 days
  • Top authors: nevis2us (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,166 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.25ms] Passed 4 tests

Server-side resources used by iPROS24 Google Translate widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.70 ▼7.40
Dashboard /wp-admin3.37 ▲0.0746.80 ▼5.95
Posts /wp-admin/edit.php3.48 ▲0.1351.52 ▲4.17
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.48 ▼11.83
Media Library /wp-admin/upload.php3.29 ▲0.0639.07 ▲8.74
Google Translate /wp-admin/options-general.php?page=ipros24-google-translate-options-page3.2638.66

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_ipros24_google_translate_widget
ipros24-google-translate-options-wordpress
db_upgraded
widget_theysaidso_widget
ipros24-google-translate-options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for iPROS24 Google Translate widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲19213.80 ▼0.8711.28 ▲9.2940.76 ▼2.15
Dashboard /wp-admin2,215 ▲244.86 ▼0.0499.04 ▼4.2039.94 ▼2.08
Posts /wp-admin/edit.php2,098 ▲92.00 ▼0.0639.93 ▼2.7234.86 ▼0.90
Add New Post /wp-admin/post-new.php1,533 ▲1423.28 ▲0.31636.23 ▼26.3158.65 ▲1.08
Media Library /wp-admin/upload.php1,394 ▲64.24 ▲0.0393.87 ▼5.4142.58 ▼1.09
Google Translate /wp-admin/options-general.php?page=ipros24-google-translate-options-page9172.0723.1231.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • ipros24-google-translate-options-wordpress
    • can_compress_scripts
    • widget_theysaidso_widget
    • ipros24-google-translate-options
    • widget_ipros24_google_translate_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_is_mobile() in wp-content/plugins/ipros24-google-translate-widget/assets/php/utils.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Google Translate widget with flags.), #2 (Plugin settings.), #3 (Widget settings.)
Please take inspiration from this readme.txt

ipros24-google-translate-widget/ipros24-google-translate.php 85% from 13 tests

"iPROS24 Google Translate widget" version 1.12.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • 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: Name the main plugin file the same as the plugin slug ("ipros24-google-translate-widget.php" instead of "ipros24-google-translate.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,623 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP2405311,023
JavaScript218716292
CSS6422209
PO File1454699

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity43.00
▷ Minimum class complexity12.00
▷ Maximum class complexity99.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods52
▷ Static methods1528.85%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.34MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/attribution/white-short.png1.69KB1.77KB0.00%
assets/images/attribution/white-regular.png2.43KB2.28KB▼ 6.11%
screenshot-2.png83.81KB32.57KB▼ 61.14%
assets/images/attribution/greyscale-short.png1.89KB1.85KB▼ 1.76%
screenshot-3.png35.95KB11.23KB▼ 68.77%