10% woo-shortcode-popup

Code Review | woo-shortcode-popup

WordPress plugin woo-shortcode-popup scored10%from 54 tests.

About plugin

  • Plugin page: woo-shortcode-popup
  • Plugin version: 20160706.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.4
  • WordPress version: 6.3.1
  • First release: Jul 14, 2016
  • Latest release: Aug 28, 2016
  • Number of updates: 10
  • Update frequency: every 4.7 days
  • Top authors: jumbaeric (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,130 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/woo-shortcode-popup/woo-shortcode-popup.php+32
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.95MB] [CPU: ▼33.65ms] Passed 4 tests

Server-side resources used by woo-shortcode-popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.43 ▲1.55
Dashboard /wp-admin3.01 ▼0.3423.79 ▼33.24
Posts /wp-admin/edit.php3.01 ▼0.3525.46 ▼20.64
Add New Post /wp-admin/post-new.php3.01 ▼2.8826.25 ▼67.46
Media Library /wp-admin/upload.php3.01 ▼0.2223.35 ▼13.26
shortcode popup /wp-admin/options-general.php?page=woo-shortcode-popup/inc/menus.php3.0122.51

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
wsp
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for woo-shortcode-popup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.28 ▼1.031.78 ▲0.1342.81 ▲3.02
Dashboard /wp-admin2,207 ▲185.81 ▲0.6896.51 ▼18.3443.77 ▲1.51
Posts /wp-admin/edit.php2,093 ▲71.99 ▼0.0139.80 ▲3.4537.41 ▲6.16
Add New Post /wp-admin/post-new.php1,536 ▲1423.19 ▼0.19636.55 ▼50.2054.70 ▼0.63
Media Library /wp-admin/upload.php1,392 ▲44.24 ▼0.09108.71 ▲10.5947.31 ▲4.40
shortcode popup /wp-admin/options-general.php?page=woo-shortcode-popup/inc/menus.php7962.0524.8825.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • wsp

Smoke tests 50% 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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=woo-shortcode-popup/inc/menus.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% 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
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 register_activation_hook() in wp-content/plugins/woo-shortcode-popup/woo-shortcode-popup.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Shop page with the button set.), #2 (Shop page with a different button text.), #3 (The popup, this is from contact form 7 shortcode), #4 (Admin settings page)
  • Contributors: The plugin contributors field is missing
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt might help

woo-shortcode-popup/woo-shortcode-popup.php 85% from 13 tests

The principal PHP file in "woo-shortcode-popup" v. 20160706.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 311 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected127 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3141989
CSS16338

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
5 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png27.10KB12.52KB▼ 53.79%
assets/screenshot-1.png44.09KB20.04KB▼ 54.55%
assets/screenshot-2.png52.73KB23.35KB▼ 55.72%
assets/screenshot-4.png18.77KB7.41KB▼ 60.52%
assets/gray-grad.png0.21KB0.18KB▼ 11.74%