10% wp-letterpot

Code Review | WP LetterPot

WordPress plugin WP LetterPot scored10%from 54 tests.

About plugin

  • Plugin page: wp-letterpot
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 18, 2018
  • Latest release: Apr 19, 2018
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: kanakogi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /545 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.92ms] Passed 4 tests

Server-side resources used by WP LetterPot
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.27 ▼39.92
Dashboard /wp-admin2.05 ▼1.265.27 ▼48.84
Posts /wp-admin/edit.php2.05 ▼1.315.12 ▼36.62
Add New Post /wp-admin/post-new.php2.05 ▼3.845.75 ▼98.28
Media Library /wp-admin/upload.php2.05 ▼1.185.19 ▼33.64
WP LetterPot /wp-admin/admin.php?page=wpletterpot2.055.68
使い方 /wp-admin/admin.php?page=wpletterpot-howto2.055.48
制作者 /wp-admin/admin.php?page=wpletterpot-developer2.056.02

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP LetterPot
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6013.15 ▼1.231.68 ▼0.4143.59 ▲0.71
Dashboard /wp-admin2,240 ▲525.88 ▲1.01101.38 ▼9.5446.93 ▲7.87
Posts /wp-admin/edit.php2,120 ▲282.06 ▲0.0536.63 ▼5.6835.42 ▼4.91
Add New Post /wp-admin/post-new.php1,558 ▲3923.01 ▼0.37632.15 ▲1.2848.74 ▼8.23
Media Library /wp-admin/upload.php1,419 ▲314.20 ▲0.0094.02 ▼7.7646.89 ▲2.30
WP LetterPot /wp-admin/admin.php?page=wpletterpot8461.7627.5465.51
使い方 /wp-admin/admin.php?page=wpletterpot-howto8171.7626.6346.34
制作者 /wp-admin/admin.php?page=wpletterpot-developer9151.7224.8272.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpletterpot-developer
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpletterpot
    • > Notice in wp-content/plugins/wp-letterpot/templates/admin_setting.php+54
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpletterpot-developer
    • > Warning in wp-content/plugins/wp-letterpot/wp-letterpot.php+146
    DOMDocument::loadHTML(): Tag header invalid in Entity, line: 55
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpletterpot-developer
    • > Warning in wp-content/plugins/wp-letterpot/wp-letterpot.php+146
    DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 214
    • > GET request to /wp-admin/admin.php?page=wpletterpot-developer
    • > Warning in wp-content/plugins/wp-letterpot/wp-letterpot.php+146
    DOMDocument::loadHTML(): Tag footer invalid in Entity, line: 230
    • > GET request to /wp-admin/admin.php?page=wpletterpot-developer
    • > Warning in wp-content/plugins/wp-letterpot/wp-letterpot.php+146
    DOMDocument::loadHTML(): Tag nav invalid in Entity, line: 232
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpletterpot-developer
    • > Warning in wp-content/plugins/wp-letterpot/wp-letterpot.php+146
    DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 208
    • > GET request to /wp-admin/admin.php?page=wpletterpot-developer
    • > Warning in wp-content/plugins/wp-letterpot/wp-letterpot.php+146
    DOMDocument::loadHTML(): Tag footer invalid in Entity, line: 224
    • > GET request to /wp-admin/admin.php?page=wpletterpot-developer
    • > Warning in wp-content/plugins/wp-letterpot/wp-letterpot.php+146
    DOMDocument::loadHTML(): Tag nav invalid in Entity, line: 226

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 6× 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/wp-letterpot/wp-letterpot.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_LetterPot' not found in wp-content/plugins/wp-letterpot/templates/admin_developer.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-letterpot/templates/letterpot.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-letterpot/templates/admin_setting.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-letterpot/templates/admin_howto.php:3
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/wp-letterpot/templates/letterpot.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

wp-letterpot/wp-letterpot.php Passed 13 tests

The entry point to "WP LetterPot" version 1.0.1 is a PHP file that has certain tags in its header comment area
36 characters long description:
LetterPotのプラグインです。

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
There were no executable files found in this plugin7,794 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript383091,0826,953
PHP53735309
CSS4321305
Sass5487210
Markdown13017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
3 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/image1.png91.07KB36.08KB▼ 60.38%
assets/images/propic.png5.86KB2.99KB▼ 48.87%
assets/images/letterpot.png4.92KB2.04KB▼ 58.47%