84% languages-frontend-display

Code Review | Languages Frontend Display

WordPress plugin Languages Frontend Display scored84%from 54 tests.

About plugin

  • Plugin page: languages-fronten...
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 8, 2017
  • Latest release: Dec 8, 2019
  • Number of updates: 6
  • Update frequency: every 172.0 days
  • Top authors: jhotadhari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Languages Frontend Display
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.34 ▼6.59
Dashboard /wp-admin3.31 ▼0.0448.67 ▼23.89
Posts /wp-admin/edit.php3.36 ▲0.0048.62 ▼2.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.13 ▲4.71
Media Library /wp-admin/upload.php3.23 ▲0.0038.03 ▼2.19

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 466 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Languages Frontend Display
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.36 ▲0.011.81 ▼0.0339.77 ▼3.61
Dashboard /wp-admin2,198 ▲185.62 ▲0.0889.66 ▼3.9738.92 ▼6.20
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0335.82 ▼3.7233.05 ▼0.50
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▲0.13609.83 ▼50.9451.30 ▼14.96
Media Library /wp-admin/upload.php1,400 ▲34.19 ▼0.0499.04 ▲1.8242.68 ▲0.41

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 119× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/languages-frontend-display/includes/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/languages-frontend-display/includes/webdevstudios/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/languages-frontend-display/includes/webdevstudios/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/languages-frontend-display/includes/composer/installers/src/Composer/Installers/GravInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/languages-frontend-display/includes/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/languages-frontend-display/includes/composer/installers/src/Composer/Installers/CockpitInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/languages-frontend-display/includes/composer/installers/src/Composer/Installers/MauticInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/languages-frontend-display/includes/composer/installers/src/Composer/Installers/CroogoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/languages-frontend-display/includes/composer/installers/src/Composer/Installers/ChefInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/languages-frontend-display/includes/composer/installers/src/Composer/Installers/WolfCMSInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
6 plugin tags: hide, qtranslate, language, disable, qtranslate-x...

languages-frontend-display/languages-frontend-display.php 92% from 13 tests

The main PHP script in "Languages Frontend Display" version 0.0.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected48,855 lines of code in 312 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78217,88231,544
PHP1492,4075,7869,156
CSS121,1021,1364,772
Sass14265251,262
JavaScript72733351,044
Markdown42220727
JSON500327
XML12023

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.63
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes154
▷ Abstract classes106.49%
▷ Concrete classes14493.51%
▷ Final classes00.00%
Methods604
▷ Static methods7812.91%
▷ Public methods49481.79%
▷ Protected methods10116.72%
▷ Private methods91.49%
Functions57
▷ Named functions5291.23%
▷ Anonymous functions58.77%
Constants13
▷ Global constants323.08%
▷ Class constants1076.92%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/webdevstudios/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
includes/webdevstudios/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
includes/webdevstudios/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/webdevstudios/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
includes/webdevstudios/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%