78% line-message-work

Code Review | LINE Message Work

WordPress plugin LINE Message Work scored78%from 54 tests.

About plugin

  • Plugin page: line-message-work
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2020
  • Latest release: Jun 16, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: anapple07 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /393 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.45MB] [CPU: ▼11.33ms] Passed 4 tests

Analyzing server-side resources used by LINE Message Work
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2539.21 ▲0.55
Dashboard /wp-admin3.56 ▲0.2647.05 ▼0.80
Posts /wp-admin/edit.php3.61 ▲0.2648.37 ▲0.86
Add New Post /wp-admin/post-new.php3.38 ▼2.5138.70 ▼45.93
Media Library /wp-admin/upload.php3.42 ▲0.1935.24 ▲3.92
WP LINE Account /wp-admin/options-general.php?page=sig-wp-line-work3.3932.45

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

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

Browser metrics Passed 4 tests

LINE Message Work: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.24 ▼1.172.02 ▲0.2744.87 ▲0.72
Dashboard /wp-admin2,210 ▲225.84 ▲0.0196.72 ▼16.4538.86 ▼6.00
Posts /wp-admin/edit.php2,096 ▲102.02 ▲0.0139.94 ▲1.4436.16 ▼3.85
Add New Post /wp-admin/post-new.php1,537 ▲1723.31 ▼0.05596.39 ▼85.2646.99 ▼2.35
Media Library /wp-admin/upload.php1,392 ▲14.22 ▼0.0297.90 ▼5.4342.24 ▼1.76
WP LINE Account /wp-admin/options-general.php?page=sig-wp-line-work8492.0727.6626.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sig-wp-line-work
    • > Notice in wp-content/plugins/line-message-work/includes/page-setup.php+53
    Undefined property: LineBot::$token_status
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sig-wp-line-work
    • > Notice in wp-content/plugins/line-message-work/includes/page-setup.php+53
    Trying to access array offset on value of type null

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
Please fix the following items
  • 72× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LINE\\LINEBot\\Event\\MessageEvent' not found in wp-content/plugins/line-message-work/LINEBot/Event/MessageEvent/UnknownMessage.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder' not found in wp-content/plugins/line-message-work/LINEBot/MessageBuilder/AudioMessageBuilder.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder\\Flex\\ComponentBuilder' not found in wp-content/plugins/line-message-work/LINEBot/MessageBuilder/Flex/ComponentBuilder/SpacerComponentBuilder.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\TemplateActionBuilder' not found in wp-content/plugins/line-message-work/LINEBot/TemplateActionBuilder/PostbackTemplateActionBuilder.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'LINE\\LINEBot\\Event\\MessageEvent' not found in wp-content/plugins/line-message-work/LINEBot/Event/MessageEvent/StickerMessage.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder\\Flex\\ComponentBuilder' not found in wp-content/plugins/line-message-work/LINEBot/MessageBuilder/Flex/ComponentBuilder/ButtonComponentBuilder.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder' not found in wp-content/plugins/line-message-work/LINEBot/MessageBuilder/FlexMessageBuilder.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'LINE\\LINEBot\arrowcast\\DemographicFilter\\OneOfDemographicFilter' not found in wp-content/plugins/line-message-work/LINEBot/Narrowcast/DemographicFilter/AppTypeDemographicFilterBuilder.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'LINE\\LINEBot\arrowcast\\DemographicFilter\\RangeDemographicFilterBuilder' not found in wp-content/plugins/line-message-work/LINEBot/Narrowcast/DemographicFilter/AgeDemographicFilterBuilder.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'LINE\\LINEBot\\MessageBuilder\\TemplateBuilder' not found in wp-content/plugins/line-message-work/LINEBot/MessageBuilder/TemplateBuilder/ImageCarouselTemplateBuilder.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: message, line, post

line-message-work/wp-line-work.php 85% from 13 tests

The primary PHP file in "LINE Message Work" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("line-message-work.php" instead of "wp-line-work.php")
  • 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,430 lines of code in 143 files:
LanguageFilesBlank linesComment linesLines of code
PHP1421,1245,5754,429
Markdown1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.05
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces26
Interfaces10
Traits0
Classes130
▷ Abstract classes43.08%
▷ Concrete classes12696.92%
▷ Final classes00.00%
Methods424
▷ Static methods235.42%
▷ Public methods41397.41%
▷ Protected methods71.65%
▷ Private methods40.94%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants169
▷ Global constants31.78%
▷ Class constants16698.22%
▷ Public constants166100.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
There were not PNG files found in your plugin