84% post-for-chatwork

Code Review | Post to Chatwork

WordPress plugin Post to Chatwork scored84%from 54 tests.

About plugin

  • Plugin page: post-for-chatwork
  • Plugin version: 0.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 22, 2016
  • Latest release: Aug 8, 2023
  • Number of updates: 4
  • Update frequency: every 666.0 days
  • Top authors: byg01046 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,255 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Post to Chatwork
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.00 ▲0.52
Dashboard /wp-admin3.31 ▲0.0146.32 ▼5.26
Posts /wp-admin/edit.php3.36 ▲0.0146.35 ▲2.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.66 ▼12.04
Media Library /wp-admin/upload.php3.23 ▲0.0133.20 ▼0.00
ChatWork連携設定 /wp-admin/options-general.php?page=post-for-chatwork/post-to-chatwork.php3.2030.94

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post to Chatwork
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.49 ▼0.894.74 ▲3.1344.20 ▲0.28
Dashboard /wp-admin2,210 ▲224.82 ▼0.0997.18 ▼7.6842.38 ▼1.93
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0440.08 ▲5.4744.23 ▲9.18
Add New Post /wp-admin/post-new.php1,527 ▼623.29 ▼0.04655.08 ▼6.3850.26 ▼8.63
Media Library /wp-admin/upload.php1,392 ▲104.22 ▲0.0192.47 ▼10.7548.64 ▲2.62
ChatWork連携設定 /wp-admin/options-general.php?page=post-for-chatwork/post-to-chatwork.php8802.0522.7891.29

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-for-chatwork/post-to-chatwork.php:13

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

post-for-chatwork/post-to-chatwork.php 92% from 13 tests

The main PHP script in "Post to Chatwork" version 0.1.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-for-chatwork.php" instead of "post-to-chatwork.php")

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 plugin146 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1620123
Markdown112023

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.28
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%
Functions6
▷ Named functions6100.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
There were not PNG files found in your plugin