84% my-online-fashion-store

Code Review | My Online Fashion Store

WordPress plugin My Online Fashion Store scored84%from 54 tests.

About plugin

  • Plugin page: my-online-fashion...
  • Plugin version: 1.0.21
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 100
  • Update frequency: every 7.2 days
  • Top authors: ccfashion (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /3,655 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.01ms] Passed 4 tests

This is a short check of server-side resources used by My Online Fashion Store
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0543.35 ▲6.49
Dashboard /wp-admin3.33 ▲0.0348.63 ▼2.00
Posts /wp-admin/edit.php3.38 ▲0.0354.03 ▲6.87
Add New Post /wp-admin/post-new.php5.91 ▲0.03100.52 ▼22.53
Media Library /wp-admin/upload.php3.26 ▲0.0338.91 ▲6.02

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: 1 new table, 9 new options
New tables
wp_myofs_products
New WordPress options
myofs_db_installed
widget_theysaidso_widget
myofs_opt_data
can_compress_scripts
widget_recent-posts
myofs_db_version
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for My Online Fashion Store
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4614.05 ▼0.301.72 ▲0.0441.66 ▼1.97
Dashboard /wp-admin2,195 ▲155.55 ▼0.0585.12 ▼6.0239.79 ▼5.69
Posts /wp-admin/edit.php2,100 ▲31.94 ▼0.0840.14 ▲4.7636.79 ▲2.20
Add New Post /wp-admin/post-new.php1,529 ▲323.01 ▼0.35583.09 ▼12.9351.68 ▲2.61
Media Library /wp-admin/upload.php1,403 ▲34.28 ▼0.0099.39 ▲1.6445.04 ▲2.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • myofs_db_installed
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Please take a closer look at the following
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_template() in wp-content/plugins/my-online-fashion-store/templates/myofs-my-inventory-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/my-online-fashion-store/templates/myofs-activation-key-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/my-online-fashion-store/templates/myofs-menus-page.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'MYOFS_API' not found in wp-content/plugins/my-online-fashion-store/templates/myofs-upgrade-save-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'MYOFS_API' not found in wp-content/plugins/my-online-fashion-store/templates/myofs-sidebar-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_template() in wp-content/plugins/my-online-fashion-store/templates/myofs-returns-page.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MYOFS_API' not found in wp-content/plugins/my-online-fashion-store/templates/myofs-my-orders-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_template() in wp-content/plugins/my-online-fashion-store/templates/myofs-my-account-page.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MYOFS_API' not found in wp-content/plugins/my-online-fashion-store/templates/myofs-marketing-marterial-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_template() in wp-content/plugins/my-online-fashion-store/templates/myofs-help-page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

my-online-fashion-store/my-online-fashion-store.php 92% from 13 tests

The main PHP script in "My Online Fashion Store" version 1.0.21 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin15,889 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82,2015098,754
PHP262505783,425
CSS8173823,069
SVG200641

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity30.75
▷ Minimum class complexity1.00
▷ Maximum class complexity171.00
Average method complexity5.89
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods73
▷ Static methods56.85%
▷ Public methods6589.04%
▷ Protected methods00.00%
▷ Private methods810.96%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants42
▷ Global constants42100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/placeholder.png4.42KB2.45KB▼ 44.59%
assets/images/remove-icon-small.png0.19KB0.19KB0.00%
assets/public/images/remove-icon-small.png0.19KB0.19KB0.00%