83% woo-custom-overlays

Code Review | WooCommerce Custom Overlays

WordPress plugin WooCommerce Custom Overlays scored83%from 54 tests.

About plugin

  • Plugin page: woo-custom-overlays
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.4
  • WordPress version: 6.3.1
  • First release: Jul 20, 2016
  • Latest release: May 2, 2017
  • Number of updates: 8
  • Update frequency: every 35.8 days
  • Top authors: amg26 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼12.46ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Custom Overlays
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.56 ▼5.72
Dashboard /wp-admin3.37 ▲0.0248.51 ▼20.69
Posts /wp-admin/edit.php3.42 ▲0.0652.64 ▼6.98
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.25 ▼16.46
Media Library /wp-admin/upload.php3.30 ▲0.0638.40 ▲3.53

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Custom Overlays
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.83 ▼0.769.28 ▲7.2538.67 ▼5.24
Dashboard /wp-admin2,197 ▲205.65 ▼0.0292.67 ▼1.8041.96 ▲1.23
Posts /wp-admin/edit.php2,102 ▼11.99 ▼0.0240.02 ▼1.2838.00 ▼0.90
Add New Post /wp-admin/post-new.php1,528 ▲223.02 ▼0.50638.22 ▲6.6153.30 ▼0.64
Media Library /wp-admin/upload.php1,399 ▲24.21 ▲0.04101.02 ▼5.2043.51 ▼1.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-custom-overlays/woo-custom-overlays.php
    • > /wp-content/plugins/woo-custom-overlays/inc/script-styles.php
    • > /wp-content/plugins/woo-custom-overlays/admin/woo-settings-tab.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (#1), #2 (#2), #3 (#3), #4 (#4), #5 (#5), #6 (#6)
Please take inspiration from this readme.txt

woo-custom-overlays/woo-custom-overlays.php 92% from 13 tests

The primary PHP file in "WooCommerce Custom Overlays" version 2.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)

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
There were no executable files found in this plugin432 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3127175404
CSS16226
JavaScript1232

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/sign-pin.png35.33KB12.04KB▼ 65.92%
assets/sold-out-banner.png49.84KB47.08KB▼ 5.54%