72% hobbynote-twitter-cards

Code Review | Hobbynote Twitter Cards

WordPress plugin Hobbynote Twitter Cards scored72%from 54 tests.

About plugin

  • Plugin page: hobbynote-twitter...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 3, 2014
  • Latest release: Apr 3, 2014
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: hobbynote (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /726 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼7.19ms] Passed 4 tests

An overview of server-side resources used by Hobbynote Twitter Cards
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.66 ▼6.71
Dashboard /wp-admin3.45 ▲0.1548.15 ▼7.32
Posts /wp-admin/edit.php3.57 ▲0.2149.72 ▲1.87
Add New Post /wp-admin/post-new.php6.03 ▲0.1587.96 ▼16.59
Media Library /wp-admin/upload.php3.37 ▲0.1542.72 ▲5.22
Homepage /wp-admin/admin.php?page=hn_tc_homepage3.3436.13
Images /wp-admin/admin.php?page=hn_tc_images3.3441.64
Général /wp-admin/admin.php?page=hn_tc_general3.3232.56
SEO /wp-admin/admin.php?page=hn_tc_seo3.3435.00

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
hn_tc
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Hobbynote Twitter Cards: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲11413.22 ▼1.171.90 ▲0.0141.24 ▼3.72
Dashboard /wp-admin2,255 ▲675.03 ▲0.15100.39 ▼10.2783.06 ▲38.29
Posts /wp-admin/edit.php2,132 ▲402.02 ▼0.0234.89 ▼1.0033.70 ▼4.24
Add New Post /wp-admin/post-new.php1,556 ▲3323.10 ▼0.08761.11 ▲94.3873.78 ▲21.06
Media Library /wp-admin/upload.php1,434 ▲464.14 ▲0.01111.72 ▼4.0971.39 ▲19.63
Debuger /wp-admin/admin.php?page=javascript:void((function(){window.open("https:/www.hobbynote.com/smo-analyzer/")})())280.440.063.82
Homepage /wp-admin/admin.php?page=hn_tc_homepage8852.1623.7938.80
Images /wp-admin/admin.php?page=hn_tc_images9542.1626.6734.54
Général /wp-admin/admin.php?page=hn_tc_general9132.0722.6531.39
Validation /wp-admin/admin.php?page=javascript:void((function(){window.open("https:/dev.twitter.com/docs/cards/validation/validator")})())280.440.064.20
SEO /wp-admin/admin.php?page=hn_tc_seo9412.0325.8831.62
Documentation /wp-admin/admin.php?page=javascript:void((function(){window.open("https:/dev.twitter.com/docs/cards/")})())280.440.074.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • hn_tc
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=hn_tc_general
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'hn_tc_general' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/hobbynote-twitter-cards/hn-twitter-cards.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=javascript:void((function(){window.open("https:/www.hobbynote.com/smo-analyzer/")})())
    • > Network (severe)
    wp-admin/admin.php?page=javascript:void((function(){window.open(%22https:/www.hobbynote.com/smo-analyzer/%22)})()) - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=javascript:void((function(){window.open("https:/dev.twitter.com/docs/cards/validation/validator")})())
    • > Network (severe)
    wp-admin/admin.php?page=javascript:void((function(){window.open(%22https:/dev.twitter.com/docs/cards/validation/validator%22)})()) - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=javascript:void((function(){window.open("https:/dev.twitter.com/docs/cards/")})())
    • > Network (severe)
    wp-admin/admin.php?page=javascript:void((function(){window.open(%22https:/dev.twitter.com/docs/cards/%22)})()) - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Screenshot du backoffice du plugin (screenshot-1.png))
You can look at the official readme.txt

hobbynote-twitter-cards/hn-twitter-cards.php 92% from 13 tests

The main file in "Hobbynote Twitter Cards" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hobbynote-twitter-cards.php" instead of "hn-twitter-cards.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected787 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24951576
CSS1300169
JavaScript1111142

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions29
▷ Named functions29100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/twitter.png1.47KB0.46KB▼ 68.92%