84% hameslack

Code Review | HameSlack

WordPress plugin HameSlack scored84%from 54 tests.

About plugin

  • Plugin page: hameslack
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jan 19, 2017
  • Latest release: Jun 5, 2018
  • Number of updates: 8
  • Update frequency: every 62.4 days
  • Top authors: Takahashi_Fumiki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,198 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
Installer ran successfully

Server metrics [RAM: ▼0.48MB] [CPU: ▼14.80ms] Passed 4 tests

A check of server-side resources used by HameSlack
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2044.23 ▲5.85
Dashboard /wp-admin3.50 ▲0.2050.71 ▼6.23
Posts /wp-admin/edit.php3.61 ▲0.2656.87 ▲8.32
Add New Post /wp-admin/post-new.php3.38 ▼2.5139.87 ▼62.28
Media Library /wp-admin/upload.php3.42 ▲0.2041.89 ▲3.48
HameSlack Setting /wp-admin/options-general.php?page=hameslack3.3937.05

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by HameSlack
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.35 ▼0.201.68 ▼0.1344.34 ▼3.24
Dashboard /wp-admin2,204 ▲275.50 ▼0.1482.91 ▼8.1241.92 ▼1.53
Posts /wp-admin/edit.php2,112 ▲122.01 ▼0.0039.42 ▲2.8837.72 ▼1.55
Add New Post /wp-admin/post-new.php1,546 ▲2018.24 ▼4.77629.75 ▼57.5267.87 ▲8.00
Media Library /wp-admin/upload.php1,415 ▲154.24 ▲0.0096.24 ▼16.8941.70 ▼7.05
HameSlack Setting /wp-admin/options-general.php?page=hameslack9702.1626.5537.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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 | 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Gianism\\Service\\AbstractService' not found in wp-content/plugins/hameslack/app/Hametuha/HameSlack/Service/Slack.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function hameslack_asset_url() in wp-content/plugins/hameslack/templates/setup.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: slack

hameslack/hameslack.php Passed 13 tests

Analyzing the main PHP file in "HameSlack" version 1.2.0
30 characters long description:
A WordPress utility for Slack.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,706 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP191676761,420
PO File18395249
JavaScript15421
CSS10015
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.40
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods38.11%
▷ Public methods3491.89%
▷ Protected methods25.41%
▷ Private methods12.70%
Functions41
▷ Named functions1946.34%
▷ Anonymous functions2253.66%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/img/slack_monochrome_black.png16.46KB7.79KB▼ 52.64%
src/img/Slack_Mark_Web.png11.52KB3.87KB▼ 66.42%
src/img/wordpress-logo-notext-rgb.png17.97KB9.60KB▼ 46.57%