93% wpml-short-code-translator

Code Review | WPML Shortcode Translator

WordPress plugin WPML Shortcode Translator scored 93% from 54 tests.

About plugin

  • Plugin page: wpml-short-code-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.0
  • WordPress version: 5.8.1
  • First release: May 16, 2014
  • Latest release: Dec 20, 2014
  • Number of updates: 13
  • Update frequency: every 16.9 days
  • Top authors: CloverValleyApps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active / 6,722 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by WPML Shortcode Translator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0134.87 ▲0.16
Dashboard /wp-admin3.07 ▲0.0146.04 ▲2.23
Posts /wp-admin/edit.php3.12 ▲0.0143.91 ▼0.22
Add New Post /wp-admin/post-new.php5.43 ▼0.0092.48 ▼570.40
Media Library /wp-admin/upload.php3.01 ▼0.0032.16 ▼12.04

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WPML Shortcode Translator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.33 ▲0.4010.28 ▼5.1548.48 ▲0.31
Dashboard /wp-admin2,967 ▲365.92 ▲0.01139.36 ▼10.60107.98 ▼8.33
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0069.86 ▲3.3988.04 ▲1.22
Add New Post /wp-admin/post-new.php1,594 ▼2118.71 ▼2.62395.46 ▲97.56106.66 ▼5.33
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.00153.21 ▼4.92124.99 ▲3.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpml-short-code-translator/index.php:47

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 88% from 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
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

wpml-short-code-translator/index.php 92% from 13 tests

This is the main PHP file of "WPML Shortcode Translator" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpml-short-code-translator.php" instead of "index.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 detected24 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1214524

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin