83% hearthisat

Code Review | hearthis.at

WordPress plugin hearthis.at scored 83% from 54 tests.

About plugin

  • Plugin page: hearthisat
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Oct 26, 2013
  • Latest release: May 4, 2021
  • Number of updates: 21
  • Update frequency: every 130.9 days
  • Top authors: hearthis (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active / 5,797 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.51ms] Passed 4 tests

A check of server-side resources used by hearthis.at
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.95 ▼1.33
Dashboard /wp-admin3.33 ▲0.0345.80 ▼0.41
Posts /wp-admin/edit.php3.38 ▲0.0244.76 ▼0.51
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.75 ▼11.77
Media Library /wp-admin/upload.php3.25 ▲0.0236.46 ▲2.47
hearthis.at /wp-admin/options-general.php?page=hearthis-shortcode-options3.2232.72

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by hearthis.at
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.46 ▼0.911.75 ▲0.0243.57 ▲2.21
Dashboard /wp-admin2,241 ▲535.07 ▼0.8695.23 ▼8.8771.41 ▲32.13
Posts /wp-admin/edit.php2,123 ▲342.28 ▲0.2936.65 ▼0.9034.36 ▲4.16
Add New Post /wp-admin/post-new.php1,553 ▲1722.95 ▼0.47748.87 ▲161.9136.32 ▼20.79
Media Library /wp-admin/upload.php1,414 ▲264.35 ▲0.1494.88 ▼5.5486.58 ▲36.52
hearthis.at /wp-admin/options-general.php?page=hearthis-shortcode-options1,2672.3446.9930.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hearthisat/public/partials/hearthis-public-display.php
    • > /wp-content/plugins/hearthisat/admin/partials/hearthis-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (with a single Track), #2 (... or with a playlist or set), #3 (... or if the url is a profile)
You can take inspiration from this readme.txt

hearthisat/hearthis.php 77% from 13 tests

Analyzing the main PHP file in "hearthis.at" version 1.0.1
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 272 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("hearthisat.php" instead of "hearthis.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected990 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12225891891
JavaScript2295499
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.57
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods55
▷ Static methods23.64%
▷ Public methods2443.64%
▷ Protected methods59.09%
▷ Private methods2647.27%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
6 PNG files occupy 0.28MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot_profile.png99.83KB33.86KB▼ 66.08%
screenshot_track.png51.86KB19.45KB▼ 62.50%
screenshot_playlist.png75.30KB28.27KB▼ 62.46%
screenshot-1.png51.86KB19.45KB▼ 62.50%
admin/img/icon.png3.44KB0.73KB▼ 78.75%