78% srbtranslatin

Code Review | SrbTransLatin - Serbian Latinisation

WordPress plugin SrbTransLatin - Serbian Latinisation scored 78% from 54 tests.

About plugin

  • Plugin page: srbtranslatin
  • Plugin version: 3.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 10, 2008
  • Latest release: Aug 22, 2023
  • Number of updates: 165
  • Update frequency: every 33.1 days
  • Top authors: pedjas (76.36%)seebeen (24.24%)

Code review

54 tests

User reviews

35 reviews

Install metrics

3,000+ active / 61,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.60ms] Passed 4 tests

Server-side resources used by SrbTransLatin - Serbian Latinisation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.81 ▼1.54
Dashboard /wp-admin3.43 ▲0.1345.80 ▼4.60
Posts /wp-admin/edit.php3.53 ▲0.1746.01 ▼0.79
Add New Post /wp-admin/post-new.php6.12 ▲0.2387.35 ▼11.45
Media Library /wp-admin/upload.php3.37 ▲0.1437.76 ▲4.11
Settings /wp-admin/admin.php?page=srbtranslatin-settings3.3836.18

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 152 new files
Database: no new tables, 7 new options
New WordPress options
widget_oblak_stl_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for SrbTransLatin - Serbian Latinisation
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.25 ▼1.144.70 ▲2.6538.74 ▼13.81
Dashboard /wp-admin2,249 ▲614.86 ▼1.02103.43 ▼9.0937.20 ▼2.48
Posts /wp-admin/edit.php2,129 ▲402.03 ▲0.0437.98 ▼1.9937.67 ▲2.46
Add New Post /wp-admin/post-new.php1,561 ▲2823.13 ▲0.04621.86 ▼43.2052.32 ▲0.93
Media Library /wp-admin/upload.php1,428 ▲404.20 ▲0.0398.87 ▼8.1144.46 ▲2.28
Settings /wp-admin/admin.php?page=srbtranslatin-settings8832.0425.1424.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_oblak_stl_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/srbtranslatin/templates/selector-list.php
    • > /wp-content/plugins/srbtranslatin/templates/selector-dropdown.php
  • 68× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/srbtranslatin/vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/srbtranslatin/vendor/symfony/css-selector/Parser/Handler/HashHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' not found in wp-content/plugins/srbtranslatin/vendor/symfony/css-selector/Exception/ParseException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/srbtranslatin/vendor/symfony/css-selector/Parser/Parser.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/srbtranslatin/vendor/symfony/css-selector/Parser/Handler/IdentifierHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/srbtranslatin/vendor/symfony/css-selector/Node/ElementNode.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractSimpleHtmlDom' not found in wp-content/plugins/srbtranslatin/vendor/voku/simple_html_dom/src/voku/helper/SimpleHtmlDom.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/srbtranslatin/vendor/symfony/css-selector/Parser/Handler/StringHandler.php:32
    • > PHP Notice
      Undefined variable: scripts in wp-content/plugins/srbtranslatin/templates/selector-dropdown.php on line 13
    • > PHP Notice
      Undefined variable: scripts in wp-content/plugins/srbtranslatin/templates/selector-oneline.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Plugin Settings page), #2 (Script Selector), #3 (WPML Language selector with cyrillic and latin scripts)
You can look at the official readme.txt

srbtranslatin/srbtranslatin.php Passed 13 tests

The main PHP script in "SrbTransLatin - Serbian Latinisation" version 3.0.0 is automatically included on every request by WordPress
107 characters long description:
SrbTransLatin - Serbian Latinisation plugin allows you to have a website in both cyrillic and latin scripts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin10,600 lines of code in 142 files:
LanguageFilesBlank linesComment linesLines of code
PHP1272,3516,6429,293
Markdown63311736
JSON700522
JavaScript18241
SVG1008

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.31
▷ Minimum class complexity1.00
▷ Maximum class complexity132.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces23
Interfaces14
Traits1
Classes94
▷ Abstract classes99.57%
▷ Concrete classes8590.43%
▷ Final classes33.53%
Methods915
▷ Static methods545.90%
▷ Public methods84292.02%
▷ Protected methods424.59%
▷ Private methods313.39%
Functions47
▷ Named functions2961.70%
▷ Anonymous functions1838.30%
Constants26
▷ Global constants519.23%
▷ Class constants2180.77%
▷ Public constants21100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/stl-cyr.png2.49KB1.13KB▼ 54.84%