90% second-default-language

Code Review | Second default language

WordPress plugin Second default language scored90%from 54 tests.

About plugin

  • Plugin page: second-default-la...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 5, 2019
  • Latest release: Oct 27, 2023
  • Number of updates: 8
  • Update frequency: every 215.6 days
  • Top authors: loyaltymanufaktur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /783 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
Install script ran successfully

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

Server-side resources used by Second default language
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.60 ▼5.01
Dashboard /wp-admin3.32 ▲0.0146.12 ▼1.90
Posts /wp-admin/edit.php3.37 ▲0.0144.42 ▼7.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0177.67 ▼13.34
Media Library /wp-admin/upload.php3.24 ▲0.0133.80 ▼4.63

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Second default language
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.14 ▼0.211.83 ▲0.0643.15 ▼3.72
Dashboard /wp-admin2,192 ▲185.61 ▼0.0697.72 ▲11.4340.65 ▼0.46
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0033.16 ▼5.6932.94 ▼0.29
Add New Post /wp-admin/post-new.php1,526 ▼1122.94 ▲4.95650.67 ▲30.8858.15 ▼11.69
Media Library /wp-admin/upload.php1,394 ▼94.30 ▲0.0593.26 ▼8.0442.70 ▼2.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: locale, translation, translate, language, textdomain...

second-default-language/second-default-language.php 92% from 13 tests

The main PHP file in "Second default language" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected63 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2162763

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin