84% harmonia

Code Review | Harmonia

WordPress plugin Harmonia scored84%from 54 tests.

About plugin

  • Plugin page: harmonia
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Aug 19, 2013
  • Latest release: Dec 14, 2013
  • Number of updates: 12
  • Update frequency: every 9.8 days
  • Top authors: greatislander (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,022 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
Installer ran successfully

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

An overview of server-side resources used by Harmonia
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.32 ▼0.09
Dashboard /wp-admin3.31 ▲0.0047.21 ▼10.62
Posts /wp-admin/edit.php3.36 ▲0.0048.84 ▼2.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.80 ▼25.18
Media Library /wp-admin/upload.php3.23 ▲0.0036.55 ▲2.62

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

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

Browser metrics Passed 4 tests

Harmonia: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14313.56 ▼0.9911.78 ▲10.1043.76 ▼1.82
Dashboard /wp-admin2,192 ▲125.59 ▼0.06123.65 ▲30.4250.45 ▲2.37
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0434.69 ▼4.8233.47 ▼6.32
Add New Post /wp-admin/post-new.php1,531 ▲523.21 ▼0.41655.22 ▲33.1265.93 ▲1.90
Media Library /wp-admin/upload.php1,391 ▼94.21 ▲0.0195.38 ▼10.5146.49 ▼0.14

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • 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 everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/harmonia/harmonia.php:33

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: mp3, audio, m4a, multimedia, aac

harmonia/harmonia.php Passed 13 tests

The primary PHP file in "Harmonia" version 1.0.3 is used by WordPress to initiate all plugin functionality
84 characters long description:
Harmonia turns any link to an MP3 or M4A file into a minimalist inline audio player.

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
Everything looks great! No dangerous files found in this plugin303 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2218137
SVG100105
CSS15850
PHP162611

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin