10% wpspx

Code Review | WPSPX

WordPress plugin WPSPX scored 10% from 54 tests.

About plugin

  • Plugin page: wpspx
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.5
  • WordPress version: 5.8.1
  • First release: Aug 7, 2020
  • Latest release: Aug 19, 2020
  • Number of updates: 9
  • Update frequency: every 1.4 days
  • Top authors: beardeddev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 277 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wpspx/config.php+11
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.86MB] [CPU: ▼192.51ms] Passed 4 tests

An overview of server-side resources used by WPSPX
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼0.956.39 ▼22.03
Dashboard /wp-admin1.79 ▼1.266.47 ▼39.39
Posts /wp-admin/edit.php1.79 ▼1.315.56 ▼32.91
Add New Post /wp-admin/post-new.php1.79 ▼3.645.44 ▼660.11
Media Library /wp-admin/upload.php1.79 ▼1.226.02 ▼37.62
WPSPX /wp-admin/admin.php?page=wpspx1.795.99
Data Sync /wp-admin/admin.php?page=wpspx-shows1.795.51
Shows /wp-admin/edit.php?post_type=shows1.796.80
Add New /wp-admin/post-new.php?post_type=shows1.796.15
Support /wp-admin/admin.php?page=wpspx-support1.796.24
Cache /wp-admin/admin.php?page=wpspx-cache1.796.86

Server storage [IO: ▲0.20MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/wpspx/" and "wp-content/uploads/"
    • (new file) wp-content/wpspx-cache/.empty
Filesystem: 66 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WPSPX
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,937 ▲36516.96 ▲1.5116.28 ▲6.0047.61 ▲1.95
Dashboard /wp-admin3,062 ▲1315.94 ▲0.02133.50 ▼18.43126.60 ▲21.49
Posts /wp-admin/edit.php2,849 ▲1102.71 ▲0.0268.38 ▲2.0289.70 ▲7.20
Add New Post /wp-admin/post-new.php1,955 ▲45524.51 ▲5.80374.84 ▲13.93105.73 ▼3.55
Media Library /wp-admin/upload.php1,850 ▲404.99 ▼0.04128.07 ▼22.28145.99 ▲33.14
WPSPX /wp-admin/admin.php?page=wpspx1,2522.0551.7988.41
Data Sync /wp-admin/admin.php?page=wpspx-shows1,3452.0954.1784.21
Shows /wp-admin/edit.php?post_type=shows1,5882.6457.4775.32
Add New /wp-admin/post-new.php?post_type=shows6,13819.21443.33123.98
Support /wp-admin/admin.php?page=wpspx-support1,6572.0655.6192.55
Cache /wp-admin/admin.php?page=wpspx-cache1,2792.1059.7887.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wpspx/config.php+11
    Trying to access array offset on value of type bool

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 38 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpspx-cache
    • > Notice in wp-content/plugins/wpspx/config.php+24
    Trying to access array offset on value of type bool
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpspx-support
    • > Warning in wp-content/plugins/wpspx/framework/spektrix/spektrix.class.php+140
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=wpspx-support
    • > Notice in wp-content/plugins/wpspx/lib/helpers/options-page.php+541
    Undefined index: HTTPS

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 43× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wpspx/lib/templates/wpspx-my-account.php
    • > /wp-content/plugins/wpspx/lib/helpers/cache/tag-groups.php
    • > /wp-content/plugins/wpspx/lib/helpers/cache/statements.php
    • > /wp-content/plugins/wpspx/activate.php
    • > /wp-content/plugins/wpspx/lib/helpers/number_to_words.php
    • > /wp-content/plugins/wpspx/lib/helpers/post-assoc.php
    • > /wp-content/plugins/wpspx/framework/spektrix/cachedfile.class.php
    • > /wp-content/plugins/wpspx/lib/templates/wpspx-donate.php
    • > /wp-content/plugins/wpspx/lib/templates/wpspx-basket.php
    • > /wp-content/plugins/wpspx/lib/templates/single-shows.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPSPX_Spektrix' not found in wp-content/plugins/wpspx/lib/helpers/cache/funds.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=wpspx-support
    • > Intervention (severe) in unknown
    /wp-admin/post-new.php?post_type=shows - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: booking, wpspx, api, tickets, theatre...

wpspx/wp-spektrix.php 85% from 13 tests

The principal PHP file in "WPSPX" v. 1.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpspx.php" instead of "wp-spektrix.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,515 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP486029362,318
Sass76734188
SVG4005
CSS2002
JavaScript2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.38
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods54
▷ Static methods814.81%
▷ Public methods4787.04%
▷ Protected methods35.56%
▷ Private methods47.41%
Functions67
▷ Named functions67100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin