10% pj-jquery-ui-helper

Code Review | PJ jQuery UI Helper

WordPress plugin PJ jQuery UI Helper scored10%from 54 tests.

About plugin

  • Plugin page: pj-jquery-ui-helper
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.2
  • WordPress version: 6.3.1
  • First release: Jun 6, 2014
  • Latest release: Apr 21, 2015
  • Number of updates: 14
  • Update frequency: every 22.9 days
  • Top authors: pjokumsen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,888 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/pj-jquery-ui-helper/main.php+86
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.54ms] Passed 4 tests

Analyzing server-side resources used by PJ jQuery UI Helper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.70 ▼0.32
Dashboard /wp-admin3.52 ▲0.1748.09 ▼19.29
Posts /wp-admin/edit.php3.57 ▲0.2154.17 ▲5.67
Add New Post /wp-admin/post-new.php6.03 ▲0.1587.93 ▼5.34
Media Library /wp-admin/upload.php3.38 ▲0.1540.34 ▲2.79
General Settings /wp-admin/admin.php?page=PJ-jQuery-UI-Helper3.3433.64
Shortcode Settings /wp-admin/admin.php?page=PJ-jQuery-UI-Helper_pjjuh_shortcode_settings3.3434.88

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 155 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
pjjuh_settings
pjjuh_shortcode_settings
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
pjjuh_version
theysaidso_admin_options

Browser metrics Passed 4 tests

PJ jQuery UI Helper: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲19713.70 ▼0.9213.82 ▲11.9441.43 ▼1.41
Dashboard /wp-admin2,222 ▲455.59 ▲0.0188.87 ▼7.0638.78 ▼5.62
Posts /wp-admin/edit.php2,127 ▲242.02 ▼0.0234.04 ▼8.0936.24 ▲0.87
Add New Post /wp-admin/post-new.php1,550 ▲2422.98 ▼0.14681.83 ▲47.5355.53 ▲2.50
Media Library /wp-admin/upload.php1,427 ▲244.19 ▼0.0996.67 ▼10.2047.61 ▲3.34
General Settings /wp-admin/admin.php?page=PJ-jQuery-UI-Helper8362.0325.9530.80
Shortcode Settings /wp-admin/admin.php?page=PJ-jQuery-UI-Helper_pjjuh_shortcode_settings8442.0026.1028.95

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • pjjuh_settings
    • widget_recent-comments
    • db_upgraded
    • pjjuh_version
    • theysaidso_admin_options
    • pjjuh_shortcode_settings
    • widget_recent-posts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 12× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/pj-jquery-ui-helper/main.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/admin-templates.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/controllers/admin-controller.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/models/shortcodes-tabs-model.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/shortcodes-tabs-main-view.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/models/admin-model.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/controllers/shortcodes-controller.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/shortcodes-dialog-main-view.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/shortcodes-accordion-main-view.php
    • > /wp-content/plugins/pj-jquery-ui-helper/includes/models/shortcodes-dialog-model.php
  • 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/tabs-html.php on line 19
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/tabs-html.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/pj-jquery-ui-helper/includes/views/admin/admin-menu-footer.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/dialog-html.php on line 21
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/tabs-html.php on line 30
    • > PHP Notice
      Undefined variable: accordion_id in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/accordion-html.php on line 15
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/dialog-script.php on line 5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/tabs-html.php on line 19
    • > PHP Notice
      Undefined variable: tab_groups in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/tabs-script.php on line 4
    • > PHP Notice
      Undefined variable: group_id in wp-content/plugins/pj-jquery-ui-helper/includes/views/shortcodes/tabs-html.php on line 17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: jquery ui, dialog, tabs

pj-jquery-ui-helper/main.php 92% from 13 tests

This is the main PHP file of "PJ jQuery UI Helper" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pj-jquery-ui-helper.php" instead of "main.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
Success! There were no dangerous files found in this plugin5,601 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS81362204,572
PHP231723421,029

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.20
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods68
▷ Static methods00.00%
▷ Public methods6088.24%
▷ Protected methods00.00%
▷ Private methods811.76%
Functions0
▷ Named functions00.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
114 PNG files occupy 0.31MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/themes/blue/minified/images/ui-icons_d8e7f3_256x240.png4.44KB4.17KB▼ 6.02%
css/themes/trontastic/images/ui-bg_flat_0_303030_40x100.png0.22KB0.08KB▼ 62.17%
css/themes/blue/images/ui-icons_f7a50d_256x240.png4.44KB4.17KB▼ 6.02%
css/themes/flick/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
css/themes/blue/minified/images/ui-icons_f7a50d_256x240.png4.44KB4.17KB▼ 6.02%