94% line-wp

Code Review | LINE for WordPress

WordPress plugin LINE for WordPress scored 94% from 53 tests.

About plugin

  • Plugin page: line-wp
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.7.0
  • WordPress version: 5.8.1
  • First release: Apr 4, 2021
  • Latest release: Apr 7, 2021
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: shohei.tanaka (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 145 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼273.91ms] Passed 4 tests

Analyzing server-side resources used by LINE for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1443.65 ▲24.63
Dashboard /wp-admin2.93 ▼0.1327.51 ▼7.94
Posts /wp-admin/edit.php2.99 ▼0.1228.74 ▼17.96
Add New Post /wp-admin/post-new.php5.00 ▼0.4387.96 ▼1,053.69
Media Library /wp-admin/upload.php2.95 ▼0.0524.09 ▼16.05
LINE Setting /wp-admin/options-general.php?page=line-settings3.0030.36

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 133 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for LINE for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲7715.94 ▲0.418.21 ▲0.0243.72 ▼2.93
Dashboard /wp-admin2,964 ▲1145.94 ▲0.03146.03 ▲9.21102.60 ▼1.04
Posts /wp-admin/edit.php2,711 ▲52.69 ▲0.0263.57 ▼5.0288.12 ▼4.01
Add New Post /wp-admin/post-new.php1,708 ▲5718.80 ▲1.61340.11 ▲0.92112.89 ▲8.72
Media Library /wp-admin/upload.php1,780 ▲115.01 ▼0.01153.31 ▲15.94112.34 ▼4.46
LINE Setting /wp-admin/options-general.php?page=line-settings1,0892.7170.8763.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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
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
  • 60× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LINE\\LINEBot\\Event\\BaseEvent' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/Event/FollowEvent.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder\\Flex\\ContainerBuilder' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/MessageBuilder/Flex/ContainerBuilder/BubbleContainerBuilder.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'LINE\\LINEBot\\Event\\BaseEvent' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/Event/LeaveEvent.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'LINE\\LINEBot\\Event\\BaseEvent' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/Event/JoinEvent.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\ImagemapActionBuilder' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/ImagemapActionBuilder/ImagemapUriActionBuilder.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder\\Flex\\ComponentBuilder' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/MessageBuilder/Flex/ComponentBuilder/TextComponentBuilder.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/MessageBuilder/VideoMessageBuilder.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder\\Flex\\ContainerBuilder' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/MessageBuilder/Flex/ContainerBuilder/CarouselContainerBuilder.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder\\TemplateBuilder' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/MessageBuilder/TemplateBuilder/CarouselColumnTemplateBuilder.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\TemplateActionBuilder' not found in wp-content/plugins/line-wp/packages/LINE/LINEBot/TemplateActionBuilder/DatetimePickerTemplateActionBuilder.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: japanese, bot, messenger, line

line-wp/line-wp.php 92% from 13 tests

The principal PHP file in "LINE for WordPress" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.7.0" instead of "5.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected4,553 lines of code in 130 files:
LanguageFilesBlank linesComment linesLines of code
PHP1291,0695,5604,550
CSS1013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.69
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity1.49
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces24
Interfaces9
Traits0
Classes119
▷ Abstract classes00.00%
▷ Concrete classes119100.00%
▷ Final classes00.00%
Methods443
▷ Static methods255.64%
▷ Public methods43698.42%
▷ Protected methods30.68%
▷ Private methods40.90%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants161
▷ Global constants106.21%
▷ Class constants15193.79%
▷ Public constants151100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin