62% q-events-light

Code Review | Q Events light

WordPress plugin Q Events light scored62%from 54 tests.

About plugin

  • Plugin page: q-events-light
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Jan 21, 2023
  • Number of updates: 23
  • Update frequency: every 33.3 days
  • Top authors: qanuk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,097 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Q Events light
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1142.62 ▼3.37
Dashboard /wp-admin3.50 ▲0.2056.89 ▼1.78
Posts /wp-admin/edit.php3.56 ▲0.2054.46 ▲3.18
Add New Post /wp-admin/post-new.php6.02 ▲0.1387.90 ▼4.37
Media Library /wp-admin/upload.php3.35 ▲0.1137.42 ▲2.34
Events /wp-admin/admin.php?page=q_events3.4139.27
Upgrade to PRO /wp-admin/admin.php?page=q_upgrade3.3540.42

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 60 new files
Database: 1 new table, 6 new options
New tables
wp_q_events_light
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Q Events light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,085 ▲32415.15 ▲0.805.17 ▲3.2840.00 ▲1.27
Dashboard /wp-admin2,381 ▲2016.25 ▲0.61110.99 ▲9.5241.61 ▲1.51
Posts /wp-admin/edit.php2,316 ▲2163.47 ▲1.4650.65 ▲10.3531.84 ▼5.12
Add New Post /wp-admin/post-new.php1,570 ▲3322.89 ▲4.70659.32 ▲29.9337.68 ▼27.46
Media Library /wp-admin/upload.php1,452 ▲524.31 ▲0.1482.52 ▼22.5249.27 ▲3.05
Events /wp-admin/admin.php?page=q_events1,3943.5652.94278.57
Upgrade to PRO /wp-admin/admin.php?page=q_upgrade1,4843.0643.1675.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_q_events_light
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% 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 | 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 items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/q-events-light/public/partials/events-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/q-events-light/admin/class-events-admin.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/q-events-light/admin/partials/events-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/q-events-light/public/class-events-public.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/q-events-light/admin/partials/events-admin-upgrade.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=q_upgrade
    • > Network (severe)
    wp-content/themes/twentytwentyone/css/events_admin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("qanuk.io")
  • Screenshots: These screenshots lack descriptions #2, #3, #4, #5 in q-events-light/assets to your readme.txt
You can look at the official readme.txt

q-events-light/events.php 92% from 13 tests

"Q Events light" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("q-events-light.php" instead of "events.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected17,465 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
SVG90169,383
CSS71,7281736,649
PHP14215573954
JavaScript313396479

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.12
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2779.41%
▷ Protected methods00.00%
▷ Private methods720.59%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/jquery-ui/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
admin/css/jquery-ui/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
admin/css/jquery-ui/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
admin/img/close.png0.63KB0.65KB0.00%
admin/css/timepicker/mtimepicker.png0.64KB0.63KB▼ 1.52%