10% hatena-connect

Code Review | Hatena Connect

WordPress plugin Hatena Connect scored10%from 54 tests.

About plugin

  • Plugin page: hatena-connect
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.3
  • WordPress version: 6.3.1
  • First release: Nov 3, 2015
  • Latest release: Nov 4, 2015
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: wanakijiji (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,721 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/hatena-connect/hatena-connect.php+35
    Trying to access array offset on value of type bool

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

An overview of server-side resources used by Hatena Connect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.73 ▲1.90
Dashboard /wp-admin3.31 ▲0.0150.44 ▲0.55
Posts /wp-admin/edit.php3.36 ▲0.0146.43 ▼5.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.80 ▼7.16
Media Library /wp-admin/upload.php3.24 ▲0.0137.78 ▲0.35
Hatena Connect /wp-admin/options-general.php?page=hatena-connect3.2033.24

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Hatena Connect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.33 ▼0.462.11 ▲0.1144.18 ▲0.29
Dashboard /wp-admin2,199 ▲255.52 ▼0.0486.38 ▲0.9838.53 ▼1.53
Posts /wp-admin/edit.php2,101 ▲11.98 ▲0.0234.88 ▼3.5634.56 ▼0.38
Add New Post /wp-admin/post-new.php1,540 ▲1218.15 ▼4.90637.57 ▼23.1753.23 ▼25.42
Media Library /wp-admin/upload.php1,404 ▲14.10 ▼0.13101.52 ▼14.1641.43 ▼8.32
Hatena Connect /wp-admin/options-general.php?page=hatena-connect8252.0323.3330.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method hatena_connect::hc_uninstall_hook() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/hatena-connect/hatena-connect.php:21

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: bookmark, hatena, notifications

hatena-connect/hatena-connect.php Passed 13 tests

"Hatena Connect" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
78 characters long description:
Connect Hatena with your wordpress blog to get notifications on Hatena notify.

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
There were no executable files found in this plugin196 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File22628104
PHP1213392

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

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