10% ququk-random-content

Code Review | QuQuk

WordPress plugin QuQuk scored10%from 54 tests.

About plugin

  • Plugin page: ququk-random-content
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Dec 27, 2013
  • Latest release: Dec 27, 2013
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: myenes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /624 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/ququk-random-content/ququk.php+18
    Undefined variable: ququkPlugin

Server metrics [RAM: ▼1.97MB] [CPU: ▼56.91ms] Passed 4 tests

A check of server-side resources used by QuQuk
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.98 ▼33.81
Dashboard /wp-admin2.05 ▼1.304.93 ▼55.92
Posts /wp-admin/edit.php2.05 ▼1.315.72 ▼43.65
Add New Post /wp-admin/post-new.php2.05 ▼3.846.05 ▼94.25
Media Library /wp-admin/upload.php2.05 ▼1.185.63 ▼29.71
QuQuk Config /wp-admin/admin.php?page=ququk/admin/ququk.php2.055.10
Category Settings /wp-admin/admin.php?page=ququk-cat2.058.09
Content Settings /wp-admin/admin.php?page=ququk-body2.054.55

Server storage [IO: ▲1.13MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_foo_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for QuQuk
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.91 ▼0.501.61 ▼0.2439.57 ▼5.19
Dashboard /wp-admin2,226 ▲495.64 ▼0.0184.00 ▼7.7235.90 ▼1.27
Posts /wp-admin/edit.php2,131 ▲311.98 ▼0.0234.54 ▼0.9533.50 ▼1.01
Add New Post /wp-admin/post-new.php1,549 ▲2323.43 ▲0.41603.73 ▼30.4471.20 ▲3.60
Media Library /wp-admin/upload.php1,419 ▲254.22 ▼0.0297.69 ▲0.9243.79 ▲1.08
QuQuk Config /wp-admin/admin.php?page=ququk/admin/ququk.php280.420.083.44
Category Settings /wp-admin/admin.php?page=ququk-cat7842.0225.9921.82
Content Settings /wp-admin/admin.php?page=ququk-body8021.9928.3725.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/ququk-random-content/ququk.php+18
    Undefined variable: ququkPlugin
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_foo_widget

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
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ququk-body
    • > Notice in wp-content/plugins/ququk-random-content/ququk.php+18
    Undefined variable: ququkPlugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ququk-body
    • > Warning in wp-content/plugins/ququk-random-content/functions.php+37
    Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=ququk/admin/ququk.php
    • > Notice in wp-content/plugins/ququk-random-content/functions.php+39
    Undefined offset: 1
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ququk-body
    • > Notice in wp-content/plugins/ququk-random-content/inc.php+14
    Undefined index: activate
    • > GET request to /wp-admin/admin.php?page=ququk-cat
    • > Warning in wp-content/plugins/ququk-random-content/inc.php+105
    include(wp-content/plugins/ququk//admin/category.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=ququk-cat
    • > Warning in wp-content/plugins/ququk-random-content/inc.php+105
    include(): Failed opening 'wp-content/plugins/ququk//admin/category.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=ququk-body
    • > Warning in wp-content/plugins/ququk-random-content/inc.php+115
    include(wp-content/plugins/ququk//admin/content.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=ququk-body
    • > Warning in wp-content/plugins/ququk-random-content/inc.php+115
    include(): Failed opening 'wp-content/plugins/ququk//admin/content.php' for inclusion (include_path='.:/usr/share/php')

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
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/ququk-random-content/admin/tpl/footer.php
    • > /wp-content/plugins/ququk-random-content/admin/tpl/header.php
  • 24× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: ququkAdmin in wp-content/plugins/ququk-random-content/admin/tpl/footer.php on line 47
    • > PHP Notice
      Undefined variable: ququkThemes in wp-content/plugins/ququk-random-content/admin/tpl/footer.php on line 73
    • > PHP Notice
      Undefined variable: ququkPlugin in wp-content/plugins/ququk-random-content/ququk.php on line 18
    • > PHP Warning
      include(): Failed opening 'admin/tpl/header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ququk-random-content/admin/content.php on line 1
    • > PHP Notice
      Undefined variable: ququkThemes in wp-content/plugins/ququk-random-content/admin/tpl/header.php on line 1
    • > PHP Warning
      include(): Failed opening 'admin/tpl/header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ququk-random-content/admin/category.php on line 1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ququk-random-content/ququk.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ququk-random-content/widget.php:2
    • > PHP Notice
      Undefined variable: ququkAdmin in wp-content/plugins/ququk-random-content/admin/tpl/footer.php on line 59
    • > PHP Fatal error
      Uncaught Error: Class 'ququkDb' not found in wp-content/plugins/ququk-random-content/admin/ququk.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=ququk/admin/ququk.php
    • > Network (severe)
    wp-admin/admin.php?page=ququk/admin/ququk.php - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin Panels '/screenshots/s1.png'), #2 (Category Panels '/screenshots/s2.png'), #3 (Category Edited Menu '/screenshots/s3.png')
You can look at the official readme.txt

ququk-random-content/ququk.php 85% from 13 tests

This is the main PHP file of "QuQuk" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ququk-random-content.php" instead of "ququk.php")
  • Description: Please use more than 10 characters for the plugin description (currently 1 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected17,762 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript202,8012,07312,466
CSS34472374,456
PHP1145103837
Markdown1103

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.33
▷ Minimum class complexity5.00
▷ Maximum class complexity18.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods829.63%
▷ Public methods2592.59%
▷ Protected methods00.00%
▷ Private methods27.41%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/s3.png24.34KB10.98KB▼ 54.89%
screenshots/s1.png56.11KB24.10KB▼ 57.05%
screenshots/s2.png28.45KB12.46KB▼ 56.21%