10% artistpress

Code Review | ArtistPress

WordPress plugin ArtistPress scored10%from 54 tests.

About plugin

  • Plugin page: artistpress
  • Plugin version: 1.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 16, 2017
  • Latest release: Nov 26, 2023
  • Number of updates: 41
  • Update frequency: every 54.6 days
  • Top authors: Tim Scheman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,831 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > 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: ▲2.74ms] Passed 4 tests

This is a short check of server-side resources used by ArtistPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6642.90 ▲1.67
Dashboard /wp-admin4.03 ▲0.7351.78 ▲2.57
Posts /wp-admin/edit.php4.10 ▲0.7452.98 ▲4.27
Add New Post /wp-admin/post-new.php6.56 ▲0.6787.62 ▲2.45
Media Library /wp-admin/upload.php3.89 ▲0.6639.28 ▲7.83
ArtistPress /wp-admin/admin.php?page=artist-press3.8635.97
Artists /wp-admin/edit.php?post_type=artist3.9539.73
Venues /wp-admin/edit.php?post_type=venue3.9537.98
Galleries /wp-admin/edit.php?post_type=artistpress-gallery3.9538.51
Settings /wp-admin/admin.php?page=artistpress-settings3.8635.51
Shows /wp-admin/edit.php?post_type=show3.9539.07

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 91 new files
Database: no new tables, 11 new options
New WordPress options
artistpress_gallery_settings
theysaidso_admin_options
artistpress_artist_settings
artistpress_show_settings
db_upgraded
widget_recent-comments
widget_recent-posts
artistpress_upgrade_settings
can_compress_scripts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for ArtistPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲9114.70 ▲0.511.89 ▼0.2640.50 ▼2.78
Dashboard /wp-admin2,249 ▲755.59 ▲0.0195.22 ▼1.1041.73 ▼3.23
Posts /wp-admin/edit.php2,084 ▼191.95 ▼0.0639.39 ▼1.3034.04 ▼2.64
Add New Post /wp-admin/post-new.php1,575 ▲4922.77 ▼0.35684.67 ▲45.6653.56 ▲1.82
Media Library /wp-admin/upload.php1,448 ▲454.15 ▼0.01100.61 ▲2.7941.21 ▼0.45
ArtistPress /wp-admin/admin.php?page=artist-press1,0222.1523.3634.71
Artists /wp-admin/edit.php?post_type=artist1,1281.9432.5329.74
Venues /wp-admin/edit.php?post_type=venue1,1311.9035.8731.21
Galleries /wp-admin/edit.php?post_type=artistpress-gallery1,1131.9134.2229.87
Settings /wp-admin/admin.php?page=artistpress-settings1,0342.0023.5429.68
Shows /wp-admin/edit.php?post_type=show1,1311.9432.2331.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 11 options in the database
    • db_upgraded
    • widget_recent-comments
    • artistpress_show_list_settings
    • artistpress_upgrade_settings
    • widget_theysaidso_widget
    • artistpress_show_settings
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix 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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/artistpress/public/views/artist-press-templates.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/artistpress/admin/includes/metaboxes/meta_box.php:4

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 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: artist, shows, gallery, custom post types, event...

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

This is the main PHP file of "ArtistPress" version 1.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as 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 | A short check of programming languages and file extensions; no executable files are allowed
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

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were 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

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.38MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/includes/images/close.png0.27KB0.29KB0.00%
public/includes/images/next.png1.32KB1.58KB0.00%
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/metaboxes/images/sprite.png6.06KB2.18KB▼ 64.10%