10% artistpress

Code Review | ArtistPress

WordPress plugin ArtistPress scored 10% from 54 tests.

About plugin

  • Plugin page: artistpress
  • Plugin version: 1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 5.9.2
  • First release: Oct 16, 2017
  • Latest release: Feb 6, 2022
  • Number of updates: 35
  • Update frequency: every 45.2 days
  • Top authors: Tim Scheman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,904 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/artistpress/admin/views/artist-press-post-types.php+345
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.68MB] [CPU: ▼289.52ms] Passed 4 tests

An overview of server-side resources used by ArtistPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7257.46 ▲6.17
Dashboard /wp-admin4.08 ▲0.6739.36 ▲6.04
Posts /wp-admin/edit.php4.32 ▲0.6844.02 ▲7.69
Add New Post /wp-admin/post-new.php7.62 ▲0.6598.74 ▼1,176.45
Media Library /wp-admin/upload.php4.03 ▲0.7329.19 ▲6.17
Settings /wp-admin/admin.php?page=artistpress-settings4.0026.50
Shows /wp-admin/edit.php?post_type=show4.0831.72
Artists /wp-admin/edit.php?post_type=artist4.0829.27
Galleries /wp-admin/edit.php?post_type=artistpress-gallery4.0829.45
Venues /wp-admin/edit.php?post_type=venue4.0828.77
ArtistPress /wp-admin/admin.php?page=artist-press4.0030.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 91 new files
Database: no new tables, 5 new options
New WordPress options
artistpress_show_settings
artistpress_show_list_settings
artistpress_upgrade_settings
artistpress_artist_settings
artistpress_gallery_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for ArtistPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,875 ▲12115.87 ▲0.206.25 ▲0.232.63 ▼0.26
Dashboard /wp-admin2,952 ▲916.15 ▼0.08116.52 ▼21.67159.20 ▼8.62
Posts /wp-admin/edit.php2,679 ▼153.24 ▲0.0162.85 ▼1.06139.73 ▼7.21
Add New Post /wp-admin/post-new.php1,739 ▲7820.77 ▲4.89438.49 ▲33.68158.37 ▲4.63
Media Library /wp-admin/upload.php1,760 ▲625.55 ▲0.05149.39 ▲8.69186.51 ▲2.16
Settings /wp-admin/admin.php?page=artistpress-settings1,2682.4157.36126.34
Shows /wp-admin/edit.php?post_type=show1,4503.1758.85107.39
Artists /wp-admin/edit.php?post_type=artist1,4522.9259.67113.62
Galleries /wp-admin/edit.php?post_type=artistpress-gallery1,4183.1760.92112.84
Venues /wp-admin/edit.php?post_type=venue1,4502.9359.86109.70
ArtistPress /wp-admin/admin.php?page=artist-press1,2652.3558.45133.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • artistpress_show_list_settings
    • artistpress_show_settings
    • artistpress_artist_settings
    • artistpress_upgrade_settings
    • artistpress_gallery_settings

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/artistpress/public/views/shortcodes/untitled.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/artistpress/admin/includes/metaboxes/meta_box.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/artistpress/public/views/artist-press-templates.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: band, artists, artist, venues, event...

artistpress/artist-press.php 85% from 13 tests

The main PHP script in "ArtistPress" version 1.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("artistpress.php" instead of "artist-press.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin7,209 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP339841,1193,644
CSS121522412,454
SVG800808
JavaScript12237271303

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.67
▷ Minimum class complexity3.00
▷ Maximum class complexity41.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods956.25%
▷ Protected methods00.00%
▷ Private methods743.75%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.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
18 PNG files occupy 0.38MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/includes/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
admin/includes/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
admin/includes/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
admin/includes/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
admin/includes/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%