84% shopkeeper-extender

Code Review | Shopkeeper Extender

WordPress plugin Shopkeeper Extender scored84%from 54 tests.

About plugin

  • Plugin page: shopkeeper-extender
  • Plugin version: 3.2
  • PHP compatiblity: 7.4.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 9, 2023
  • Latest release: Nov 24, 2023
  • Number of updates: 14
  • Update frequency: every 20.6 days
  • Top authors: getbowtied (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /46,780 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.10ms] Passed 4 tests

A check of server-side resources used by Shopkeeper Extender
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.70 ▼7.64
Dashboard /wp-admin3.31 ▲0.0146.54 ▼8.36
Posts /wp-admin/edit.php3.36 ▲0.0047.19 ▼0.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.34 ▼3.62
Media Library /wp-admin/upload.php3.23 ▲0.0034.71 ▲0.78

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shopkeeper Extender
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4314.32 ▼0.451.77 ▲0.0738.65 ▼3.38
Dashboard /wp-admin2,213 ▲365.61 ▼0.0794.96 ▼8.6043.73 ▼3.04
Posts /wp-admin/edit.php2,116 ▲191.96 ▲0.0139.51 ▲0.4038.75 ▲1.07
Add New Post /wp-admin/post-new.php1,545 ▲1923.14 ▲0.12582.18 ▼69.7453.78 ▼3.71
Media Library /wp-admin/upload.php1,415 ▲214.15 ▼0.0597.12 ▼3.7944.65 ▲2.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 take a closer look at the following
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shopkeeper-extender/includes/custom-menu/class/class-sk-ext-navwalker-image.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shopkeeper-extender/includes/custom-menu/class/class-sk-ext-navwalker-image.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_categories() in wp-content/plugins/shopkeeper-extender/includes/shortcodes/wb/categories-grid.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shopkeeper-extender/includes/helpers/helpers.php:45
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shopkeeper-extender/includes/customizer/repeater/class-sk-ext-repeater-control.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shopkeeper-extender/includes/shortcodes/wc/categories-grid.php:135
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shopkeeper-extender/includes/social-media/class-social-media.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shopkeeper-extender/includes/shortcodes/wp/slider.php:60
    • > PHP Warning
      include(): Failed opening 'ABSPATHWPINC/class-wp-customize-control.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/shopkeeper-extender/includes/customizer/repeater/class-sk-ext-repeater-control.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map() in wp-content/plugins/shopkeeper-extender/includes/shortcodes/wb/banner.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce, shopkeeper, wordpress, theme

shopkeeper-extender/shopkeeper-extender.php Passed 13 tests

"Shopkeeper Extender" version 3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
Extends the functionality of Shopkeeper with theme specific features.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin5,207 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP225464872,576
Sass722351,314
CSS156513940
JavaScript109651354
JSON15023

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.73
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods53
▷ Static methods47.55%
▷ Public methods3973.58%
▷ Protected methods815.09%
▷ Private methods611.32%
Functions34
▷ Named functions2058.82%
▷ Anonymous functions1441.18%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/updater/assets/images/shopkeeper-extender-256x256.png15.87KB7.57KB▼ 52.28%
core/updater/assets/images/shopkeeper-banner-772x250.png3.96KB1.97KB▼ 50.10%
core/updater/assets/images/shopkeeper-banner-1544x500.png9.16KB3.84KB▼ 58.08%
core/updater/assets/images/shopkeeper-extender-128x128.png7.89KB3.88KB▼ 50.76%