84% multilang-block

Code Review | Multilang Block

WordPress plugin Multilang Block scored84%from 54 tests.

About plugin

  • Plugin page: multilang-block
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-5.6.0
  • WordPress version: 6.3.1
  • First release: Feb 5, 2021
  • Latest release: Feb 5, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: artpi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /609 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
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.39ms] Passed 4 tests

Server-side resources used by Multilang Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.86 ▼3.19
Dashboard /wp-admin3.31 ▼0.0347.98 ▼22.30
Posts /wp-admin/edit.php3.36 ▲0.0149.83 ▲2.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.30 ▼10.89
Media Library /wp-admin/upload.php3.23 ▲0.0036.02 ▲5.56

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

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

Browser metrics Passed 4 tests

Multilang Block: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.40 ▲0.051.72 ▼0.3739.88 ▼6.44
Dashboard /wp-admin2,192 ▲155.54 ▼0.1283.85 ▼15.7242.81 ▼1.25
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0739.59 ▲1.5037.79 ▼2.49
Add New Post /wp-admin/post-new.php6,194 ▲4,66519.20 ▼4.61893.84 ▲224.4759.33 ▲6.48
Media Library /wp-admin/upload.php1,400 ▼34.22 ▼0.07102.30 ▲3.4043.53 ▲0.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 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/multilang-block/multilang-block.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: language, translation, multilang, multilanguage

multilang-block/multilang-block.php Passed 13 tests

"Multilang Block" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
Create hidden content visible only for speakers of other languages

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
Success! There were no dangerous files found in this plugin121 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP261855
JSON20031
JavaScript331018
XML13015
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin