84% gtranslate-dynamic-media

Code Review | GTranslate Dynamic Media

WordPress plugin GTranslate Dynamic Media scored 84% from 54 tests.

About plugin

  • Plugin page: gtranslate-dynami...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-4.0
  • WordPress version: 6.3.1
  • First release: Nov 26, 2014
  • Latest release: Nov 26, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: unclhos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,165 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 gracefully, with no errors

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

An overview of server-side resources used by GTranslate Dynamic Media
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.70 ▼5.39
Dashboard /wp-admin3.31 ▲0.0145.02 ▼2.60
Posts /wp-admin/edit.php3.36 ▲0.0149.95 ▼1.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.15 ▼2.46
Media Library /wp-admin/upload.php3.23 ▲0.0136.33 ▲2.37

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for GTranslate Dynamic Media
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.65 ▼1.001.75 ▼0.3641.68 ▼2.48
Dashboard /wp-admin2,206 ▲214.83 ▼1.03107.34 ▼0.9536.38 ▼6.40
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0140.17 ▲0.2234.16 ▼0.29
Add New Post /wp-admin/post-new.php1,533 ▲1323.24 ▲0.05651.25 ▼4.6554.49 ▼7.81
Media Library /wp-admin/upload.php1,391 ▼04.16 ▼0.0194.05 ▼6.5844.42 ▲1.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gtranslate-dynamic-media/gtranslate-dynamic-media.php:12

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 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
9 plugin tags: gtranslate, addon, dynamic, extension, media...

gtranslate-dynamic-media/gtranslate-dynamic-media.php Passed 13 tests

Analyzing the main PHP file in "GTranslate Dynamic Media" version 1.0
135 characters long description:
Allows media to be dynamically change for the language being displayed with shortcodes. IE: Instructional videos in multiple languages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP117746

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions2
▷ Named functions2100.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