10% gambit-arrow-custom-front-end-translator

Code Review | Gambit Arrow Custom Front End Translator

WordPress plugin Gambit Arrow Custom Front End Translator scored10%from 54 tests.

About plugin

  • Plugin page: gambit-arrow-cust...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Aug 2, 2013
  • Latest release: Aug 2, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: alvaron (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /817 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/gambit-arrow-custom-front-end-translator/traduz-palavras.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; TraduzPalavras has a deprecated constructor

Server metrics [RAM: ▼1.80MB] [CPU: ▼50.39ms] Passed 4 tests

A check of server-side resources used by Gambit Arrow Custom Front End Translator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.274.93 ▼35.14
Dashboard /wp-admin2.22 ▼1.095.81 ▼42.66
Posts /wp-admin/edit.php2.22 ▼1.145.84 ▼41.39
Add New Post /wp-admin/post-new.php2.22 ▼3.687.47 ▼82.37
Media Library /wp-admin/upload.php2.22 ▼1.025.98 ▼25.10
GAFE Translator /wp-admin/options-general.php?page=gambit-arrow-custom-front-end-translator/traduz-palavras.php2.226.39

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: 2 new tables, 6 new options
New tables
wp_palavras
wp_palavras_jquery
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gambit Arrow Custom Front End Translator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8814.42 ▼0.132.81 ▲1.1544.29 ▼3.07
Dashboard /wp-admin2,219 ▲395.64 ▲0.0382.83 ▼16.1738.29 ▼6.65
Posts /wp-admin/edit.php2,127 ▲272.09 ▲0.0835.22 ▼2.2432.28 ▼5.98
Add New Post /wp-admin/post-new.php1,548 ▲1723.19 ▲0.38668.65 ▲0.7255.23 ▲6.40
Media Library /wp-admin/upload.php1,430 ▲304.25 ▲0.06103.10 ▲9.2245.64 ▼0.63
GAFE Translator /wp-admin/options-general.php?page=gambit-arrow-custom-front-end-translator/traduz-palavras.php1,0751.8231.4630.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/gambit-arrow-custom-front-end-translator/traduz-palavras.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; TraduzPalavras has a deprecated constructor
  • Zombie tables detected upon uninstall: 2 tables
    • wp_palavras_jquery
    • wp_palavras
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=gambit-arrow-custom-front-end-translator/traduz-palavras.php
    • > Deprecated in wp-content/plugins/gambit-arrow-custom-front-end-translator/traduz-palavras.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; TraduzPalavras has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=gambit-arrow-custom-front-end-translator/traduz-palavras.php
    • > Deprecated in wp-content/plugins/gambit-arrow-custom-front-end-translator/traduz-palavras.php+1051
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gambit-arrow-custom-front-end-translator/traduz-palavras.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gambit-arrow-custom-front-end-translator/traduz-palavras.php:1047

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=gambit-arrow-custom-front-end-translator/traduz-palavras.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'msie')" "TypeError: Cannot read properties of undefined (reading 'msie')\n at $.extend.tablesorter.clearTableBody (/wp-content/plugins/gambit-arrow-custom-front-end-translator/js/jquery.tablesorter.js:1723:31)\n at renderTable (/wp-content/plugins/gambit-arrow-custom-front-end-translator/js/jquery.tablesorter.pager.js:173:19)\n at Object.appender (/wp-content/plugins/gambit-arrow-custom-front-end-translator/js/jquery.tablesorter.pager.js:241:5)\n at appendToTable (/wp-content/plugins/gambit-arrow-custom-front-end-translator/js/jquery.tablesorter.js:715:34)\n at HTMLTableElement.\u003Canonymous> (/wp-content/plugins/gambit-arrow-custom-front-end-translator/js/jquery.tablesorter.js:1631:25)\n at HTMLTableElement.dispatch (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:39997)\n at v.handle (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:37968)\n at Object.trigger (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:70063)\n at HTMLTableElement.\u003Canonymous> (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:70665)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)" undefined
    • > GET request to /wp-admin/options-general.php?page=gambit-arrow-custom-front-end-translator/traduz-palavras.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (The plugin interface on wp-admin, with words an custom jQuery)
You can look at the official readme.txt

gambit-arrow-custom-front-end-translator/traduz-palavras.php 85% from 13 tests

The primary PHP file in "Gambit Arrow Custom Front End Translator" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 200 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("gambit-arrow-custom-front-end-translator.php" instead of "traduz-palavras.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,306 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42204671,865
PHP12660441

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity55.00
▷ Minimum class complexity55.00
▷ Maximum class complexity55.00
Average method complexity6.78
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imagens/prev.png0.73KB0.73KB0.00%
imagens/last.png0.72KB0.73KB0.00%
imagens/next.png0.72KB0.72KB0.00%
imagens/first.png0.70KB0.72KB0.00%