84% site-language-definition

Code Review | Site Language Definition

WordPress plugin Site Language Definition scored84%from 54 tests.

About plugin

  • Plugin page: site-language-def...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2016
  • Latest release: Feb 6, 2016
  • Number of updates: 3
  • Update frequency: every 2.7 days
  • Top authors: stubgo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,191 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: ▼1.42ms] Passed 4 tests

A check of server-side resources used by Site Language Definition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.64 ▲0.77
Dashboard /wp-admin3.32 ▲0.0148.52 ▼1.35
Posts /wp-admin/edit.php3.37 ▲0.0146.31 ▼5.06
Add New Post /wp-admin/post-new.php5.90 ▲0.01116.00 ▲18.89
Media Library /wp-admin/upload.php3.24 ▲0.0135.79 ▼0.03

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Site Language Definition
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲13713.52 ▼0.8610.50 ▲8.5741.66 ▼10.17
Dashboard /wp-admin2,209 ▲215.90 ▲0.01103.49 ▼11.7842.07 ▲1.82
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0134.38 ▼0.5731.64 ▼6.28
Add New Post /wp-admin/post-new.php1,533 ▼423.45 ▲0.32661.20 ▼7.3855.80 ▲2.47
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0397.11 ▲1.2740.83 ▼5.47

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/site-language-definition/site-language-definition.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: lang, wpsos, language attribute, meta tag, meta...

site-language-definition/site-language-definition.php Passed 13 tests

The main file in "Site Language Definition" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
110 characters long description:
Site Language Definition is a simple plugin for forcing the web browser to know what language your site is in.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin40 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121630
JavaScript10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for 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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin