78% woo-store-mode

Code Review | Woo Store Mode

WordPress plugin Woo Store Mode scored78%from 54 tests.

About plugin

  • Plugin page: woo-store-mode
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 28, 2018
  • Latest release: Sep 28, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: simonhunter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /499 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.07ms] Passed 4 tests

A check of server-side resources used by Woo Store Mode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0146.32 ▲6.05
Dashboard /wp-admin3.32 ▲0.0149.87 ▼3.52
Posts /wp-admin/edit.php3.37 ▲0.0150.54 ▼0.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0198.46 ▲1.49
Media Library /wp-admin/upload.php3.24 ▲0.0137.52 ▲2.01

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Woo Store Mode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.35 ▼0.041.91 ▲0.3143.88 ▲2.21
Dashboard /wp-admin2,198 ▲215.65 ▲0.0597.87 ▲6.5847.96 ▲3.68
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0435.21 ▼4.7535.88 ▼0.75
Add New Post /wp-admin/post-new.php1,538 ▲1018.22 ▼4.86594.61 ▼128.1568.50 ▲18.23
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.04101.76 ▼27.2042.10 ▼8.21

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-store-mode/public/partials/rone-woo-store-mode-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rone_get_current_mode() in wp-content/plugins/woo-store-mode/admin/partials/rone-woo-store-mode-admin-display.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === woo-store-mode === )
You can look at the official readme.txt

woo-store-mode/rone-woo-store-mode.php 85% from 13 tests

The main PHP script in "Woo Store Mode" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-store-mode.php" instead of "rone-woo-store-mode.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,476 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32223321,809
PHP13257529635
CSS24132

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.62
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods511.63%
▷ Public methods3786.05%
▷ Protected methods12.33%
▷ Private methods511.63%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin