10% wp-artists-lite

Code Review | WPArtists

WordPress plugin WPArtists scored10%from 54 tests.

About plugin

  • Plugin page: wp-artists-lite
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.0
  • WordPress version: 6.3.1
  • First release: Mar 16, 2013
  • Latest release: Dec 12, 2013
  • Number of updates: 14
  • Update frequency: every 19.4 days
  • Top authors: b4ucode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,803 total downloads

Benchmarks

Plugin footprint 40% 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 cannot be installed
    • > Deprecated in wp-content/plugins/wp-artists-lite/libraries/lib.widgets.php+120
    Function create_function() is deprecated

Server metrics [RAM: ▼1.55MB] [CPU: ▼59.69ms] Passed 4 tests

Server-side resources used by WPArtists
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.44 ▼1.028.08 ▼34.16
Dashboard /wp-admin2.46 ▼0.889.69 ▼54.90
Posts /wp-admin/edit.php2.46 ▼0.898.10 ▼47.41
Add New Post /wp-admin/post-new.php2.46 ▼3.428.28 ▼102.28
Media Library /wp-admin/upload.php2.46 ▼0.779.51 ▼28.63
Artists /wp-admin/edit.php?post_type=wpa_artist2.469.13
Premium /wp-admin/admin.php?page=wpartists_preimum2.468.18
Music /wp-admin/edit.php?post_type=wpa_music2.468.54
Labels /wp-admin/edit.php?post_type=wpa_labels2.468.13
Settings /wp-admin/admin.php?page=wpartists_settings2.4610.22

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_wpaallinone_widget
widget_recent-comments
widget_wpamusic_widget
post_type_rules_flased_wpa_music
db_upgraded
post_type_rules_flased_wpa_labels
...

Browser metrics Passed 4 tests

An overview of browser requirements for WPArtists
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲24314.37 ▲0.079.00 ▲7.2242.01 ▼0.83
Dashboard /wp-admin2,258 ▲704.93 ▼0.97113.49 ▼4.8245.49 ▼0.57
Posts /wp-admin/edit.php2,152 ▲632.31 ▲0.2839.04 ▼0.7434.35 ▼0.80
Add New Post /wp-admin/post-new.php1,571 ▲5723.52 ▲5.90689.73 ▲13.9853.01 ▲0.15
Media Library /wp-admin/upload.php1,444 ▲564.27 ▲0.07103.50 ▼16.4842.55 ▼5.76
Artists /wp-admin/edit.php?post_type=wpa_artist1,1242.2735.0032.04
Premium /wp-admin/admin.php?page=wpartists_preimum9281.8428.9431.79
Music /wp-admin/edit.php?post_type=wpa_music1,1402.2735.5729.04
Labels /wp-admin/edit.php?post_type=wpa_labels1,1162.2735.2429.39
Settings /wp-admin/admin.php?page=wpartists_settings9191.8728.9029.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-artists-lite/libraries/lib.widgets.php+120
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 11 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • post_type_rules_flased_wpa_labels
    • widget_recent-comments
    • widget_recent-posts
    • widget_wpamusic_widget
    • post_type_rules_flased_wpa_artist
    • post_type_rules_flased_wpa_music
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpartists_settings
    • > Deprecated in wp-content/plugins/wp-artists-lite/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=wpartists_settings
    • > Notice in wp-content/plugins/wp-artists-lite/wpartists.php+53
    Undefined index: wpa_edit
    • > GET request to /wp-admin/admin.php?page=wpartists_settings
    • > Notice in wp-content/plugins/wp-artists-lite/libraries/core.php+78
    Undefined index: wpa_artist_nonce

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
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-artists-lite/libraries/lib.shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-artists-lite/libraries/lib.shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-artists-lite/libraries/lib.shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-artists-lite/libraries/lib.widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-artists-lite/libraries/lib.frontend.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-artists-lite/libraries/lib.metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-artists-lite/libraries/lib.posttype.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpartists_settings
    • > 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/wp-artists-lite/js/wpa_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=wpartists_settings
    • > 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
    • > GET request to /wp-admin/admin.php?page=wpartists_preimum
    • > Network (severe)
    http://demo.b4ucode.com/wpartist/wp-content/uploads/2012/11/screenshot_music_admin.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wpartists_preimum
    • > Network (severe)
    http://demo.b4ucode.com/wpartist/wp-content/uploads/2012/11/screenshot_video_admin.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wpartists_preimum
    • > Network (severe)
    http://demo.b4ucode.com/wpartist/wp-content/uploads/2012/11/widget.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-artists-lite === )
  • Screenshots: No descriptions were found for these screenshots #0, #0, #0 in wp-artists-lite/assets to your readme.txt
You can take inspiration from this readme.txt

wp-artists-lite/wpartists.php 85% from 13 tests

Analyzing the main PHP file in "WPArtists" version 0.0.2
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 230 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-artists-lite.php" instead of "wpartists.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin3,806 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP93332212,366
JavaScript818499958
CSS2935482

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in 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%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ie6/borderTopRight.png0.21KB0.20KB▼ 2.34%
images/ie6/borderTopLeft.png0.21KB0.20KB▼ 4.63%
images/loading_background.png0.15KB0.15KB▼ 0.64%
images/ie6/borderBottomCenter.png0.11KB0.10KB▼ 8.11%
images/overlay.png0.18KB0.15KB▼ 15.93%