10% dc-artists

Code Review | DC Artists

WordPress plugin DC Artists scored10%from 54 tests.

About plugin

  • Plugin page: dc-artists
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2016
  • Latest release: Jan 31, 2017
  • Number of updates: 70
  • Update frequency: every 1.6 days
  • Top authors: ganddser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,745 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/dc-artists/libraries/lib.widgets.php+120
    Function create_function() is deprecated

Server metrics [RAM: ▼1.57MB] [CPU: ▼60.05ms] Passed 4 tests

Analyzing server-side resources used by DC Artists
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.43 ▼1.036.68 ▼38.85
Dashboard /wp-admin2.45 ▼0.897.50 ▼59.49
Posts /wp-admin/edit.php2.45 ▼0.908.45 ▼41.94
Add New Post /wp-admin/post-new.php2.45 ▼3.438.26 ▼99.92
Media Library /wp-admin/upload.php2.45 ▼0.789.61 ▼28.38
Artists /wp-admin/edit.php?post_type=dca_artist2.458.09
Labels /wp-admin/edit.php?post_type=dca_labels2.459.54
Music /wp-admin/edit.php?post_type=dca_music2.457.48
Settings /wp-admin/admin.php?page=dcartists_settings2.457.61
Info /wp-admin/admin.php?page=dcartists_info2.457.75

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
post_type_rules_flased_dca_labels
widget_recent-posts
theysaidso_admin_options
post_type_rules_flased_dca_artist
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_dcaallinone_widget
widget_dcamusic_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by DC Artists
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲24214.22 ▼0.148.65 ▲6.6941.30 ▼2.44
Dashboard /wp-admin2,247 ▲705.70 ▲0.1390.76 ▼4.9640.99 ▲0.46
Posts /wp-admin/edit.php2,166 ▲662.30 ▲0.2738.59 ▼0.5235.38 ▼1.74
Add New Post /wp-admin/post-new.php1,569 ▲4123.11 ▼0.00610.58 ▼21.1452.37 ▲3.33
Media Library /wp-admin/upload.php1,459 ▲594.31 ▲0.11109.49 ▲9.6845.23 ▲1.43
Artists /wp-admin/edit.php?post_type=dca_artist1,1352.2537.4930.87
Labels /wp-admin/edit.php?post_type=dca_labels1,1272.2635.0330.65
Music /wp-admin/edit.php?post_type=dca_music1,1482.2235.0230.31
Settings /wp-admin/admin.php?page=dcartists_settings9111.8428.0928.54
Info /wp-admin/admin.php?page=dcartists_info8971.8027.4026.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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/dc-artists/libraries/lib.widgets.php+120
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 11 options
    • can_compress_scripts
    • post_type_rules_flased_dca_artist
    • widget_dcamusic_widget
    • widget_recent-comments
    • post_type_rules_flased_dca_music
    • widget_theysaidso_widget
    • widget_dcaallinone_widget
    • theysaidso_admin_options
    • db_upgraded
    • post_type_rules_flased_dca_labels
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dcartists_info
    • > Deprecated in wp-content/plugins/dc-artists/libraries/lib.widgets.php+242
    Function create_function() is deprecated
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dcartists_info
    • > Notice in wp-content/plugins/dc-artists/dcartists.php+57
    Undefined index: dca_edit

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dc-artists/libraries/lib.shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dc-artists/libraries/lib.posttype.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dc-artists/libraries/lib.shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dc-artists/libraries/lib.metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dc-artists/libraries/lib.widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dc-artists/libraries/lib.shortcodes.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dcartists_info
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,thickbox,underscore,shortcode,media-upload,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/dc-artists/js/dca_admin.js?ver=6.3.1:5:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,thickbox,underscore,shortcode,media-upload,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,thickbox,underscore,shortcode,media-upload,utils&ver=6.3.1:2:27292)" undefined
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dcartists_info
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,thickbox,underscore,shortcode,media-upload,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: links, music artwork, artist, label, music manager...

dc-artists/dcartists.php 85% from 13 tests

The main PHP file in "DC Artists" ver. 1.4.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("dc-artists.php" instead of "dcartists.php")
  • Description: The description should be shorter than 140 characters (currently 231 characters long)

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
Good job! No executable or dangerous file extensions detected3,044 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP82391851,604
JavaScript818499958
CSS2935482

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity17.67
▷ Minimum class complexity13.00
▷ Maximum class complexity27.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions44
▷ Named functions44100.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
12 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/border.png0.11KB0.10KB▼ 7.14%
images/ie6/borderTopLeft.png0.21KB0.20KB▼ 4.63%
images/controls.png2.83KB1.28KB▼ 54.82%
images/overlay.png0.18KB0.15KB▼ 15.93%
images/ie6/borderBottomLeft.png0.21KB0.20KB▼ 4.19%