84% tomahk-shortcodes

Code Review | Toma.hk Shortcodes

WordPress plugin Toma.hk Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: tomahk-shortcodes
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2013
  • Latest release: Apr 24, 2013
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: grosbouff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.32ms] Passed 4 tests

This is a short check of server-side resources used by Toma.hk Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.25 ▼2.58
Dashboard /wp-admin3.35 ▲0.0455.56 ▲5.62
Posts /wp-admin/edit.php3.46 ▲0.1049.03 ▼6.13
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.51 ▼14.15
Media Library /wp-admin/upload.php3.27 ▲0.0440.05 ▲1.59

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Toma.hk Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.21 ▼1.301.80 ▲0.0743.64 ▼1.25
Dashboard /wp-admin2,218 ▲124.85 ▼0.05113.64 ▲12.2344.48 ▼0.52
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0635.19 ▼6.1634.05 ▼1.04
Add New Post /wp-admin/post-new.php1,545 ▲1923.32 ▲5.82668.28 ▲4.3759.71 ▲1.93
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.03100.72 ▼3.8245.90 ▲0.32

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/tomahk-shortcodes/tomahk-shortcodes.php:53

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: tomahk, soundcloud, tomahawk, spotify, exfm...

tomahk-shortcodes/tomahk-shortcodes.php Passed 13 tests

"Toma.hk Shortcodes" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
73 characters long description:
Use shortcodes to embed playlists, albums and single tracks from toma.hk.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected262 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112163262

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.75
▷ Minimum class complexity4.00
▷ Maximum class complexity17.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin