84% wpml-translate-shortcode

Code Review | WPML Translate Shortcode

WordPress plugin WPML Translate Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: wpml-translate-sh...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2014
  • Latest release: Mar 4, 2016
  • Number of updates: 8
  • Update frequency: every 92.1 days
  • Top authors: mirkolofio (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /9,079 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

A check of server-side resources used by WPML Translate Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.77 ▼3.71
Dashboard /wp-admin3.31 ▲0.0148.67 ▼6.55
Posts /wp-admin/edit.php3.36 ▲0.0148.88 ▼2.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.33 ▲2.43
Media Library /wp-admin/upload.php3.24 ▲0.0138.49 ▼0.83

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

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

Browser metrics Passed 4 tests

WPML Translate Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.48 ▼0.171.75 ▲0.1043.78 ▼5.10
Dashboard /wp-admin2,215 ▲304.84 ▼0.02100.84 ▼10.3542.19 ▼0.12
Posts /wp-admin/edit.php2,097 ▲52.06 ▲0.0339.65 ▲1.6436.62 ▼1.75
Add New Post /wp-admin/post-new.php1,523 ▼1017.59 ▼5.94665.07 ▼50.5352.51 ▼14.33
Media Library /wp-admin/upload.php1,400 ▲124.15 ▼0.04101.32 ▼8.5945.34 ▼5.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpml-translate-shortcode/wpml-translate-shortcode.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: plugin, translation, translator, shortcode, language...

wpml-translate-shortcode/wpml-translate-shortcode.php Passed 13 tests

Analyzing the main PHP file in "WPML Translate Shortcode" version 1.0.1
45 characters long description:
It's deprecated. Use WPML Shortcodes instead.

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
Success! There were no dangerous files found in this plugin46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1132546

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin