84% hametupack

Code Review | HametuPack

WordPress plugin HametuPack scored84%from 54 tests.

About plugin

  • Plugin page: hametupack
  • Plugin version: 1.2.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 7, 2017
  • Latest release: Jul 5, 2018
  • Number of updates: 18
  • Update frequency: every 21.9 days
  • Top authors: Takahashi_Fumiki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,499 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.34ms] Passed 4 tests

An overview of server-side resources used by HametuPack
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.61 ▲4.37
Dashboard /wp-admin3.32 ▼0.0343.05 ▼13.34
Posts /wp-admin/edit.php3.37 ▲0.0146.87 ▼1.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.99 ▼2.58
Media Library /wp-admin/upload.php3.24 ▲0.0133.22 ▲0.30

Server storage [IO: ▲0.21MB] [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: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for HametuPack
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.29 ▼1.364.48 ▲2.6544.60 ▲3.70
Dashboard /wp-admin2,213 ▲285.81 ▼0.01100.40 ▼4.5540.64 ▼4.43
Posts /wp-admin/edit.php2,095 ▲32.02 ▲0.0540.21 ▲1.0035.89 ▼2.55
Add New Post /wp-admin/post-new.php1,540 ▲2123.16 ▼0.08601.87 ▼51.2162.78 ▼3.84
Media Library /wp-admin/upload.php1,392 ▲104.21 ▲0.0396.37 ▼2.2042.83 ▲2.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | 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 fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\HametuPack\\ShareDaddy\\AbstractShare' not found in wp-content/plugins/hametupack/app/Hametuha/HametuPack/ShareDaddy/ShareHatebu.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hametupack/includes/ogp.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hametupack/includes/amp.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\HametuPack\\OGP\\TwitterCard' not found in wp-content/plugins/hametupack/template-parts/player-card-audio.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hametupack/includes/sharedaddy.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\HametuPack\\ShareDaddy\\AbstractShare' not found in wp-content/plugins/hametupack/app/Hametuha/HametuPack/ShareDaddy/ShareLine.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Sharing_Source' not found in wp-content/plugins/hametupack/app/Hametuha/HametuPack/ShareDaddy/AbstractShare.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\HametuPack\\OGP\\TwitterCard' not found in wp-content/plugins/hametupack/template-parts/player-card-video.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: line, japan, jetpack, hatena

hametupack/hametupack.php Passed 13 tests

The main file in "HametuPack" v. 1.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
47 characters long description:
This plugin add small functionality to Jetpack.

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
There were no executable files found in this plugin1,173 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP17156417850
JavaScript1171688
PO File1242786
Sass16256
Markdown130047
SVG30044
CSS1111
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.14
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods45
▷ Static methods48.89%
▷ Public methods4191.11%
▷ Protected methods24.44%
▷ Private methods24.44%
Functions27
▷ Named functions622.22%
▷ Anonymous functions2177.78%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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