78% guitar-tabs

Code Review | Guitar Tabs

WordPress plugin Guitar Tabs scored78%from 54 tests.

About plugin

  • Plugin page: guitar-tabs
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 11, 2018
  • Latest release: Oct 11, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: digisphere (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,141 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.50ms] Passed 4 tests

A check of server-side resources used by Guitar Tabs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1441.88 ▲1.22
Dashboard /wp-admin3.44 ▲0.1349.44 ▼4.28
Posts /wp-admin/edit.php3.55 ▲0.1947.55 ▼2.75
Add New Post /wp-admin/post-new.php6.05 ▲0.1699.16 ▲2.94
Media Library /wp-admin/upload.php3.36 ▲0.1338.21 ▼0.18
All Songs /wp-admin/edit.php?post_type=song3.4137.99
Authors /wp-admin/edit-tags.php?taxonomy=song_author&post_type=song3.3641.28
Genres /wp-admin/edit-tags.php?taxonomy=genre&post_type=song3.3634.23
Add New /wp-admin/post-new.php?post_type=song3.5152.58

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Guitar Tabs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲19514.08 ▼0.6413.06 ▲11.2041.29 ▼4.67
Dashboard /wp-admin2,247 ▲705.59 ▼0.0188.41 ▼6.0644.81 ▲0.39
Posts /wp-admin/edit.php2,158 ▲612.01 ▲0.0435.73 ▼2.3335.52 ▼0.49
Add New Post /wp-admin/post-new.php1,572 ▲4423.38 ▲0.04675.88 ▼17.2162.03 ▲2.80
Media Library /wp-admin/upload.php1,455 ▲554.27 ▲0.1697.88 ▼16.6545.46 ▼5.01
All Songs /wp-admin/edit.php?post_type=song1,1751.9432.7030.27
Authors /wp-admin/edit-tags.php?taxonomy=song_author&post_type=song1,3012.1926.5930.27
Genres /wp-admin/edit-tags.php?taxonomy=genre&post_type=song1,3292.1927.4030.48
Add New /wp-admin/post-new.php?post_type=song3,6098.00205.2375.54

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/guitar-tabs/inc/settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/guitar-tabs/inc/shortcode-gtab.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/guitar-tabs/inc/single.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/guitar-tabs/inc/cpt.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/guitar-tabs/inc/cpt.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/guitar-tabs/inc/panel.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=genre&post_type=song
    • > Javascript (severe) in unknown
    /wp-content/plugins/guitar-tabs/assets/js/gtabs-song.js?ver=6.3.1 18:29 Uncaught TypeError: Cannot set properties of null (setting 'innerHTML')

Optimizations

Plugin configuration 93% from 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
6 plugin tags: tabs, guitar-tabs, guitar, guitar tabs, shortcodes...

guitar-tabs/guitar-tabs.php 85% from 13 tests

"Guitar Tabs" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/lang" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected7,176 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42932,5046,732
PHP77065375
CSS20869

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.26
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin