10% beatport-discography-shortcode

Code Review | Beatport Discography shortcode

WordPress plugin Beatport Discography shortcode scored10%from 54 tests.

About plugin

  • Plugin page: beatport-discogra...
  • Plugin version: 1.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 6.3.1
  • First release: Mar 12, 2013
  • Latest release: Oct 7, 2015
  • Number of updates: 45
  • Update frequency: every 20.9 days
  • Top authors: fgiustdj@gmail.com (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /7,033 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/beatport-discography-shortcode/beatport-discography-shortcode.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; BeatportDiscography_shortcode has a deprecated constructor

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.00ms] Passed 4 tests

A check of server-side resources used by Beatport Discography shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.13 ▲2.17
Dashboard /wp-admin3.31 ▲0.0146.60 ▼2.04
Posts /wp-admin/edit.php3.36 ▲0.0145.48 ▼0.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.21 ▼8.96
Media Library /wp-admin/upload.php3.24 ▲0.0134.86 ▼0.74

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Beatport Discography shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲15513.91 ▼0.4613.84 ▲11.5243.32 ▼7.54
Dashboard /wp-admin2,209 ▲215.84 ▼0.0597.39 ▼9.9738.66 ▼2.56
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0134.15 ▼4.4534.25 ▼1.31
Add New Post /wp-admin/post-new.php1,531 ▲323.30 ▼0.02669.04 ▼12.8453.09 ▼0.58
Media Library /wp-admin/upload.php1,391 ▼04.20 ▲0.0498.20 ▼3.0442.79 ▼3.47

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

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/beatport-discography-shortcode/beatport-discography-shortcode.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 75% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (New button on toolbar)
  • Contributors: Contributors not specified
  • Screenshots: These screenshots lack descriptions #7, #8 in beatport-discography-shortcode/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === beatport-discography-shortcode === )
The official readme.txt might help

beatport-discography-shortcode/beatport-discography-shortcode.php Passed 13 tests

The primary PHP file in "Beatport Discography shortcode" version 1.3.8 is used by WordPress to initiate all plugin functionality
43 characters long description:
Embed Beatport Discography using shortcodes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,776 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript411588535
CSS36722489
PHP19864408
HTML1610344

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity71.00
▷ Minimum class complexity71.00
▷ Maximum class complexity71.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/beatport-shortcode-button.png3.57KB0.86KB▼ 75.92%
image/icon-pause.png0.21KB0.24KB0.00%
image/key-play-pause.png3.98KB0.67KB▼ 83.07%
image/icon-play.png0.28KB0.31KB0.00%