62% os-wc-shop-design

Code Review | OS WooCommerce Shop Design

WordPress plugin OS WooCommerce Shop Design scored62%from 54 tests.

About plugin

  • Plugin page: os-wc-shop-design
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.4
  • WordPress version: 6.3.1
  • First release: Nov 20, 2015
  • Latest release: Apr 24, 2017
  • Number of updates: 7
  • Update frequency: every 74.6 days
  • Top authors: offshorent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,605 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by OS WooCommerce Shop Design
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.31 ▼0.79
Dashboard /wp-admin3.12 ▼0.2322.93 ▼35.19
Posts /wp-admin/edit.php3.12 ▼0.2423.94 ▼23.14
Add New Post /wp-admin/post-new.php3.12 ▼2.7723.28 ▼71.72
Media Library /wp-admin/upload.php3.12 ▼0.1124.91 ▼9.54
About /wp-admin/edit.php?post_type=os-our-team&page=about-developer3.1224.16

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

OS WooCommerce Shop Design: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8613.69 ▼0.703.05 ▲1.3538.15 ▼3.15
Dashboard /wp-admin2,208 ▲175.86 ▲0.96108.84 ▲3.3738.88 ▼6.66
Posts /wp-admin/edit.php2,091 ▼12.02 ▼0.0039.66 ▼0.6134.59 ▼3.08
Add New Post /wp-admin/post-new.php1,530 ▼1223.30 ▲5.06624.14 ▼12.2349.47 ▼3.01
Media Library /wp-admin/upload.php1,390 ▲24.21 ▼0.0893.83 ▼5.8941.61 ▼3.08
About /wp-admin/edit.php?post_type=os-our-team&page=about-developer280.440.093.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/os-wc-shop-design/includes/admin/os-wc-shop-design-about.php+36
    Use of undefined constant OT_TEXT_DOMAIN - assumed 'OT_TEXT_DOMAIN' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=os-our-team&page=about-developer
    • > Warning in wp-content/plugins/os-wc-shop-design/includes/admin/os-wc-shop-design-about.php+36
    Use of undefined constant OT_TEXT_DOMAIN - assumed 'OT_TEXT_DOMAIN' (this will throw an Error in a future version of PHP)

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/os-wc-shop-design/woocommerce/loop/loop-start.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=os-our-team&page=about-developer
    • > Network (severe)
    wp-admin/edit.php?post_type=os-our-team&page=about-developer - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (OS WC Shop Design admin interface), #2 (OS WC Shop Design shop page)
You can take inspiration from this readme.txt

os-wc-shop-design/os-wc-shop-design.php Passed 13 tests

This is the main PHP file of "OS WooCommerce Shop Design" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
97 characters long description:
OS WC Shop Design is giving some additional features and effects to the default woocommerce shop.

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
Everything looks great! No dangerous files found in this plugin1,466 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript270469814
PHP8167346504
CSS33322148

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.33
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods35
▷ Static methods12.86%
▷ Public methods3394.29%
▷ Protected methods00.00%
▷ Private methods25.71%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.26MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png180.38KB63.46KB▼ 64.82%
images/select-arrow.png0.24KB0.24KB▼ 0.82%
images/social.png1.61KB1.12KB▼ 30.45%
plugins/bxslider/icons.png22.29KB9.12KB▼ 59.08%
screenshot-1.png60.37KB23.75KB▼ 60.65%