78% showpass

Code Review | Showpass Wordpress Extension

WordPress plugin Showpass Wordpress Extension scored78%from 54 tests.

About plugin

  • Plugin page: showpass
  • Plugin version: 3.8.6
  • PHP compatiblity: 5.4.45+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 21, 2018
  • Latest release: Nov 6, 2023
  • Number of updates: 73
  • Update frequency: every 24.4 days
  • Top authors: marcshowpass (86.3%)cgarrovillosp (6.85%)kylemilloy (4.11%)spapril (4.11%)victorduartesp (2.74%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /10,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼0.46ms] Passed 4 tests

An overview of server-side resources used by Showpass Wordpress Extension
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2343.67 ▲4.14
Dashboard /wp-admin3.49 ▲0.1947.38 ▼0.41
Posts /wp-admin/edit.php3.61 ▲0.2546.40 ▼0.32
Add New Post /wp-admin/post-new.php6.08 ▲0.1985.80 ▼5.26
Media Library /wp-admin/upload.php3.42 ▲0.1937.83 ▲6.25

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Showpass Wordpress Extension
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲20816.14 ▲1.7922.10 ▲20.3142.01 ▼0.64
Dashboard /wp-admin2,207 ▲295.60 ▼0.1284.34 ▼18.8887.52 ▲48.60
Posts /wp-admin/edit.php2,118 ▲181.98 ▼0.0235.63 ▼7.3134.24 ▼5.74
Add New Post /wp-admin/post-new.php6,211 ▲4,68519.12 ▼4.55877.77 ▲261.0136.73 ▼10.23
Media Library /wp-admin/upload.php1,418 ▲154.12 ▼0.0699.02 ▼1.8066.01 ▲24.72

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 items
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/showpass/inc/default-list.php
    • > /wp-content/plugins/showpass/inc/default-product-grid.php
    • > /wp-content/plugins/showpass/inc/default-product-list.php
    • > /wp-content/plugins/showpass/inc/button-verbiage.php
    • > /wp-content/plugins/showpass/inc/default-pricing-table.php
    • > /wp-content/plugins/showpass/inc/default-grid.php
  • 33× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: event in wp-content/plugins/showpass/inc/button-verbiage.php on line 7
    • > PHP Notice
      Undefined variable: event in wp-content/plugins/showpass/inc/button-verbiage.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/showpass/inc/default-product-list.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function showpass_ticket_sold_out() in wp-content/plugins/showpass/inc/button-logic.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/showpass/inc/button-verbiage.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/showpass/inc/default-detail.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/showpass/inc/default-product-grid.php on line 26
    • > PHP Notice
      Undefined variable: event in wp-content/plugins/showpass/inc/button-verbiage.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/showpass/inc/button-verbiage.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/showpass/inc/default-grid.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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: purchase tickets, sell tickets, showpass, events, event calendar...

showpass/showpass-wordpress-plugin.php 85% from 13 tests

The principal PHP file in "Showpass Wordpress Extension" v. 3.8.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 253 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("showpass.php" instead of "showpass-wordpress-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin7,927 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript129184754,506
PHP162482241,893
CSS7239721,528

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods5
▷ Static methods240.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions36
▷ Named functions3391.67%
▷ Anonymous functions38.33%
Constants10
▷ Global constants660.00%
▷ Class constants440.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png14.97KB0.53KB▼ 96.44%
images/arrow_right_white.png1.46KB0.29KB▼ 80.31%
images/arrow_left.png1.83KB0.29KB▼ 83.91%
images/down-arrow.png2.00KB0.14KB▼ 92.83%
images/arrow_right.png1.83KB0.29KB▼ 84.35%