84% woocommerce-flipper

Code Review | WooCommerce Product Flipper

WordPress plugin WooCommerce Product Flipper scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-flipper
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2015
  • Latest release: Oct 2, 2016
  • Number of updates: 52
  • Update frequency: every 13.4 days
  • Top authors: aumsrini (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /5,515 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 gracefully, with no errors

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

Server-side resources used by WooCommerce Product Flipper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.15 ▼3.60
Dashboard /wp-admin3.31 ▲0.0147.67 ▼2.11
Posts /wp-admin/edit.php3.36 ▲0.0152.80 ▲1.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.31 ▼13.92
Media Library /wp-admin/upload.php3.24 ▲0.0142.44 ▲5.64

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Product Flipper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.60 ▼0.781.85 ▼0.0250.13 ▲8.78
Dashboard /wp-admin2,200 ▲125.06 ▲0.13104.33 ▲1.5641.56 ▼2.93
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0634.27 ▼9.1035.24 ▼0.41
Add New Post /wp-admin/post-new.php1,545 ▲2523.41 ▲0.13668.42 ▲43.8258.64 ▲10.05
Media Library /wp-admin/upload.php1,385 ▲34.23 ▲0.02106.43 ▲3.9644.54 ▼0.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-flipper/wc-flipper.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
7 plugin tags: images, product, product photos, ecommerce, photos...

woocommerce-flipper/wc-flipper.php 85% from 13 tests

The primary PHP file in "WooCommerce Product Flipper" version 0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-flipper.php" instead of "wc-flipper.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin367 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS16829279
PHP1263044
PO File171832
JavaScript1009
Markdown1103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin