84% simpleshop-cz

Code Review | SimpleShop

WordPress plugin SimpleShop scored84%from 54 tests.

About plugin

  • Plugin page: simpleshop-cz
  • Plugin version: 2.9.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 15, 2018
  • Latest release: Oct 18, 2023
  • Number of updates: 57
  • Update frequency: every 32.6 days
  • Top authors: jakubboucek (52.63%)redbitcz (40.35%)vitvavra (10.53%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /17,642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by SimpleShop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.8944.26 ▼4.83
Dashboard /wp-admin4.52 ▲1.1857.04 ▼0.47
Posts /wp-admin/edit.php4.58 ▲1.2150.17 ▲3.02
Add New Post /wp-admin/post-new.php7.06 ▲1.1794.55 ▼1.06
Media Library /wp-admin/upload.php4.45 ▲1.2245.20 ▲10.65
Settings /wp-admin/admin.php?page=ssc_options4.9149.67
Member sections /wp-admin/edit.php?post_type=ssc_group4.4942.94

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 414 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
ssc_plugin_version
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
ssc_cache_products

Browser metrics Passed 4 tests

SimpleShop: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9514.20 ▲0.021.60 ▼0.0837.37 ▼6.56
Dashboard /wp-admin2,236 ▲555.53 ▼0.1990.10 ▼10.7482.16 ▲40.90
Posts /wp-admin/edit.php2,144 ▲441.99 ▼0.0234.82 ▼2.2033.84 ▼1.49
Add New Post /wp-admin/post-new.php6,400 ▲4,87422.54 ▼0.41897.78 ▲213.0468.71 ▲1.40
Media Library /wp-admin/upload.php1,438 ▲414.24 ▼0.0893.41 ▼10.6080.23 ▲33.84
Settings /wp-admin/admin.php?page=ssc_options1,7776.94133.3375.34
Member sections /wp-admin/edit.php?post_type=ssc_group1,1161.9231.4026.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • ssc_plugin_version
    • ssc_cache_products
    • db_upgraded

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 45× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpleshop-cz/vendor/cmb2/cmb2/includes/helper-functions.php:131
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpleshop-cz/vendor/webdevstudios/cmb2-post-search-field/cmb2_post_search_field.php:106
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/simpleshop-cz/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/simpleshop-cz/vendor/cmb2/cmb2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/simpleshop-cz/vendor/cmb2/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/simpleshop-cz/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpleshop-cz/vendor/webdevstudios/cmb2-post-search-field/cmb2_post_search_field.php:106
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/simpleshop-cz/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpleshop-cz/vendor/cmb2/cmb2/example-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/simpleshop-cz/vendor/cmb2/cmb2/includes/types/CMB2_Type_Title.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: selling form, simpleshop, membership, access control, simpleshopcz...

simpleshop-cz/simpleshop-cz.php 92% from 13 tests

Analyzing the main PHP file in "SimpleShop" version 2.9.1
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin58,353 lines of code in 260 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP882,9107,91110,451
JSON5006,849
CSS152511,2134,577
JavaScript114015931,942
Sass17306291,411
Markdown42590800

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity18.79
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes92
▷ Abstract classes99.78%
▷ Concrete classes8390.22%
▷ Final classes00.00%
Methods744
▷ Static methods11515.46%
▷ Public methods63485.22%
▷ Protected methods10013.44%
▷ Private methods101.34%
Functions41
▷ Named functions3687.80%
▷ Anonymous functions512.20%
Constants82
▷ Global constants89.76%
▷ Class constants7490.24%
▷ Public constants74100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/webdevstudios/cmb2-post-search-field/post-search-field.png18.07KB5.58KB▼ 69.11%
vendor/cmb2/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
vendor/cmb2/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
vendor/cmb2/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendor/cmb2/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%