63% show-translation-origin

Code Review | Show Translation Origin

WordPress plugin Show Translation Origin scored63%from 54 tests.

About plugin

  • Plugin page: show-translation-...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.3
  • WordPress version: 6.3.1
  • First release: Dec 11, 2015
  • Latest release: Nov 18, 2016
  • Number of updates: 24
  • Update frequency: every 14.5 days
  • Top authors: triplebit2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /749 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.11ms] Passed 4 tests

An overview of server-side resources used by Show Translation Origin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.55 ▼2.22
Dashboard /wp-admin3.31 ▼0.0343.78 ▼17.66
Posts /wp-admin/edit.php3.36 ▲0.0148.89 ▲2.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.40 ▼16.57
Media Library /wp-admin/upload.php3.24 ▲0.0135.52 ▲0.01

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_rdhil_localization_table
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
rdhilpho_options
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Show Translation Origin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17215.06 ▲0.776.63 ▲4.6739.73 ▼3.76
Dashboard /wp-admin2,213 ▲226.04 ▲1.15125.73 ▲14.3741.03 ▼5.71
Posts /wp-admin/edit.php2,096 ▲42.41 ▲0.4150.71 ▲13.4136.27 ▲5.55
Add New Post /wp-admin/post-new.php1,530 ▲1118.66 ▼4.60601.15 ▼62.2553.31 ▼4.60
Media Library /wp-admin/upload.php1,392 ▲44.65 ▲0.4698.50 ▲4.0443.55 ▼0.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Uninstaller has failed for this plugin, leaving 6 files (0.10MB) in the plugin directory
    • (new file) css/tooltip.css
    • (new file) screenshot-1.jpg
    • (new file) uninstall.php
    • (new file) js/hover_text.js
    • (new file) show_translation_origin.php
    • (new file) Readme.txt
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • db_upgraded
    • rdhilpho_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-translation-origin/show_translation_origin.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Shows Translation Origin in action) image required
The official readme.txt is a good inspiration

show-translation-origin/show_translation_origin.php 85% from 13 tests

"Show Translation Origin" version 1.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Main file name: The principal plugin file should be the same as the plugin slug ("show-translation-origin.php" instead of "show_translation_origin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected281 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP26156202
JavaScript114570
CSS1009

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin