10% pledgemusic

Code Review | PledgeMusic

WordPress plugin PledgeMusic scored10%from 54 tests.

About plugin

  • Plugin page: pledgemusic
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Jan 10, 2013
  • Latest release: Aug 10, 2013
  • Number of updates: 18
  • Update frequency: every 11.8 days
  • Top authors: 45press (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,574 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/pledgemusic/pledgemusic.php+276
    Function create_function() is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼53.36ms] Passed 4 tests

An overview of server-side resources used by PledgeMusic
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.335.61 ▼35.23
Dashboard /wp-admin2.16 ▼1.157.69 ▼40.07
Posts /wp-admin/edit.php2.16 ▼1.206.68 ▼46.32
Add New Post /wp-admin/post-new.php2.16 ▼3.736.96 ▼91.83
Media Library /wp-admin/upload.php2.16 ▼1.087.94 ▼25.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
pm_options
widget_theysaidso_widget
widget_pledgemusic_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for PledgeMusic
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.32 ▼0.022.17 ▲0.3742.90 ▼0.59
Dashboard /wp-admin2,201 ▲245.57 ▲0.0489.03 ▼12.6471.87 ▲29.80
Posts /wp-admin/edit.php2,121 ▲182.00 ▲0.0237.90 ▼3.4833.42 ▼2.61
Add New Post /wp-admin/post-new.php1,695 ▲16721.72 ▼1.56679.44 ▼5.6457.33 ▲2.65
Media Library /wp-admin/upload.php1,415 ▲154.15 ▼0.07111.77 ▲8.1679.23 ▲33.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/pledgemusic/pledgemusic.php+276
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_pledgemusic_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/pledgemusic/pledgemusic.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/pledgemusic/pledgemusic.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === pledgemusic === )
The official readme.txt is a good inspiration

pledgemusic/pledgemusic.php Passed 13 tests

The principal PHP file in "PledgeMusic" v. 1.2.1 is loaded by WordPress automatically on each request
97 characters long description:
Provides the ability to display your PledgeMusic campaign via a sidebar widget or lightbox popup.

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 plugin1,387 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5293119889
CSS15118290
PHP11950208

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
22 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/js/fancybox/fancy_close.png1.48KB1.73KB0.00%
includes/js/fancybox/fancy_title_right.png0.49KB0.82KB0.00%
includes/js/fancybox/fancybox-y.png0.17KB0.24KB0.00%
includes/js/fancybox/fancy_shadow_nw.png0.32KB0.47KB0.00%
includes/images/pledgemusic_32.png5.58KB1.75KB▼ 68.68%