84% smart-language-select-disabler-for-polylang

Code Review | Smart Language Select Disabler for Polylang

WordPress plugin Smart Language Select Disabler for Polylang scored84%from 54 tests.

About plugin

  • Plugin page: smart-language-se...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.3-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 6, 2019
  • Latest release: Aug 6, 2019
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: aucor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /617 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Smart Language Select Disabler for Polylang
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.62 ▼6.76
Dashboard /wp-admin3.31 ▼0.0447.21 ▼20.85
Posts /wp-admin/edit.php3.36 ▲0.0047.97 ▼1.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.01 ▼22.06
Media Library /wp-admin/upload.php3.23 ▲0.0034.72 ▼3.54

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Language Select Disabler for Polylang
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.78 ▼0.1345.75 ▲2.02
Dashboard /wp-admin2,192 ▲185.63 ▲0.0788.02 ▼12.2241.09 ▼5.57
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0439.35 ▲3.9040.22 ▲3.18
Add New Post /wp-admin/post-new.php1,526 ▼023.55 ▲0.49669.25 ▼5.6753.47 ▲1.44
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.03102.08 ▼9.4847.50 ▲1.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-language-select-disabler-for-polylang/polylang-smart-language-select-disabler.php:198

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
4 plugin tags: language select, admin, wordpress, olylang

smart-language-select-disabler-for-polylang/polylang-smart-language-select-disabler.php 92% from 13 tests

The main PHP script in "Smart Language Select Disabler for Polylang" version 1.1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("smart-language-select-disabler-for-polylang.php" instead of "polylang-smart-language-select-disabler.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected231 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14155106
Markdown137062
XML171046
JSON10017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity2.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
PNG images were not found in this plugin