74% chordpress

Code Review | Lewe ChordPress - ChordPro Text Formatter

WordPress plugin Lewe ChordPress - ChordPro Text Formatter scored74%from 54 tests.

About plugin

  • Plugin page: chordpress
  • Plugin version: 3.6.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 25, 2018
  • Latest release: Nov 15, 2023
  • Number of updates: 106
  • Update frequency: every 16.9 days
  • Top authors: glewe (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /6,501 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.47ms] Passed 4 tests

A check of server-side resources used by Lewe ChordPress - ChordPro Text Formatter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.46 ▼4.66
Dashboard /wp-admin3.36 ▲0.0544.75 ▼11.00
Posts /wp-admin/edit.php3.41 ▲0.0545.87 ▲3.98
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.26 ▼4.89
Media Library /wp-admin/upload.php3.28 ▲0.0531.91 ▼5.33
Add New /wp-admin/post-new.php?post_type=guitar_chord3.3550.21
Options /wp-admin/admin.php?page=chordpress/admin/partials/chordpress-admin-options.php3.9047.56
Guitar Chords /wp-admin/edit.php?post_type=guitar_chord3.3336.01
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=guitar_chord3.2732.67
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=guitar_chord3.2736.00

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
category_children
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Lewe ChordPress - ChordPro Text Formatter: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲18315.67 ▲0.906.47 ▲4.5737.46 ▼6.39
Dashboard /wp-admin2,250 ▲765.92 ▲0.2896.91 ▼0.9475.49 ▲28.41
Posts /wp-admin/edit.php2,167 ▲702.84 ▲0.9043.18 ▲7.0542.78 ▲9.90
Add New Post /wp-admin/post-new.php1,592 ▲6625.54 ▲2.40661.50 ▼62.7138.24 ▼22.08
Media Library /wp-admin/upload.php1,461 ▲615.50 ▲1.22105.23 ▼8.5476.04 ▲27.84
Add New /wp-admin/post-new.php?post_type=guitar_chord2,0053.8375.4874.59
Options /wp-admin/admin.php?page=chordpress/admin/partials/chordpress-admin-options.php2,5023.2039.5481.58
Guitar Chords /wp-admin/edit.php?post_type=guitar_chord1,2132.8835.2330.36
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=guitar_chord1,3892.6731.2332.62
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=guitar_chord1,5222.7130.1034.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • category_children
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/chordpress/public/partials/chordpress-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
9 plugin tags: music, chords, sheet, sound, chord...

chordpress/chordpress.php Passed 13 tests

The entry point to "Lewe ChordPress - ChordPro Text Formatter" version 3.6.0 is a PHP file that has certain tags in its header comment area
82 characters long description:
This plugin renders ChordPro formatted text and chord diagrams in WordPress sites.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .cmd - Command Script in Windows
      • wp-content/plugins/chordpress/makepot.cmd
14,465 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,3391,1325,910
CSS29751485,092
PHP175712,4173,462
DOS Batch1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity33.00
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods133
▷ Static methods21.50%
▷ Public methods11485.71%
▷ Protected methods00.00%
▷ Private methods1914.29%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.78MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-256x256.png55.93KB19.50KB▼ 65.14%
admin/images/icon-96x96.png12.30KB4.44KB▼ 63.89%
admin/images/banner-300x97.png20.66KB9.47KB▼ 54.18%
admin/images/icon-20x20.png2.73KB1.12KB▼ 58.83%
admin/images/banner-247x80.png15.43KB7.23KB▼ 53.15%