84% wp-art-store

Code Review | WP Art Store

WordPress plugin WP Art Store scored84%from 54 tests.

About plugin

  • Plugin page: wp-art-store
  • Plugin version: 0.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.2.2
  • WordPress version: 6.3.1
  • First release: May 16, 2015
  • Latest release: Jun 1, 2015
  • Number of updates: 5
  • Update frequency: every 3.2 days
  • Top authors: jazzs3quence (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,208 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.84MB] [CPU: ▲20.05ms] Passed 4 tests

This is a short check of server-side resources used by WP Art Store
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8564.37 ▲15.72
Dashboard /wp-admin4.14 ▲0.8469.02 ▲22.27
Posts /wp-admin/edit.php4.19 ▲0.8373.56 ▲24.24
Add New Post /wp-admin/post-new.php6.75 ▲0.87105.80 ▲17.96
Media Library /wp-admin/upload.php4.07 ▲0.8465.03 ▲29.71
Themes/Subjects /wp-admin/edit-tags.php?taxonomy=art-store-subject&post_type=art-store-work4.0657.21
Add New Work /wp-admin/post-new.php?post_type=art-store-work4.6479.32
Media /wp-admin/edit-tags.php?taxonomy=art-store-medium&post_type=art-store-work4.0765.95
Options /wp-admin/edit.php?post_type=art-store-work&page=art_store_options4.4459.79
All Works /wp-admin/edit.php?post_type=art-store-work4.1056.77
Art Forms /wp-admin/edit-tags.php?taxonomy=art-store-form&post_type=art-store-work4.0759.84

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 211 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_art-store-related-products
widget_recent-comments
can_compress_scripts
widget_art-store-product
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Art Store
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲9113.22 ▼1.582.16 ▼0.0639.17 ▼5.57
Dashboard /wp-admin2,252 ▲614.84 ▼0.03108.84 ▲6.5340.97 ▼1.36
Posts /wp-admin/edit.php2,132 ▲432.00 ▼0.0540.43 ▼2.0935.09 ▼7.87
Add New Post /wp-admin/post-new.php1,590 ▲5723.70 ▲0.45698.27 ▲26.1438.09 ▼30.88
Media Library /wp-admin/upload.php1,431 ▲464.28 ▲0.1298.28 ▼7.1243.66 ▼1.39
Themes/Subjects /wp-admin/edit-tags.php?taxonomy=art-store-subject&post_type=art-store-work1,2772.1432.1827.86
Add New Work /wp-admin/post-new.php?post_type=art-store-work3,2289.65247.9596.07
Media /wp-admin/edit-tags.php?taxonomy=art-store-medium&post_type=art-store-work1,6662.2728.4433.05
Options /wp-admin/edit.php?post_type=art-store-work&page=art_store_options1,2433.5345.9425.00
All Works /wp-admin/edit.php?post_type=art-store-work1,1292.0031.1330.03
Art Forms /wp-admin/edit-tags.php?taxonomy=art-store-form&post_type=art-store-work1,6192.1427.4431.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_art-store-product
    • widget_art-store-related-products
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-art-store/inc/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-art-store/inc/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-art-store/inc/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-art-store/inc/cmb2/tests/cmb-tests-base.php:10
    • > PHP Warning
      require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-art-store/inc/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-art-store/inc/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-art-store/inc/cmb2/init.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-art-store/inc/cmb2/example-functions.php:68
    • > PHP Notice
      Undefined variable: test_root in wp-content/plugins/wp-art-store/inc/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-art-store/inc/cmb2/tests/cmb-tests-base.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: store, artstore, art, paypal, work...

wp-art-store/art-store.php 85% from 13 tests

This is the main PHP file of "WP Art Store" version 0.9.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 243 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-art-store.php" instead of "art-store.php")

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
Success! There were no dangerous files found in this plugin78,719 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
XML20047,741
PO File968,90211,86620,424
PHP291,7092,8995,659
CSS39655132,063
Sass9157241,079
JavaScript9193173846
Markdown71770532
JSON600160
YAML290148
Bourne Shell118767

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.68
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes13.57%
▷ Concrete classes2796.43%
▷ Final classes00.00%
Methods365
▷ Static methods215.75%
▷ Public methods35597.26%
▷ Protected methods51.37%
▷ Private methods51.37%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
inc/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
inc/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
inc/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%