68% planaby-shows-and-events-widget

Code Review | Planaby Shows and Events Widget

WordPress plugin Planaby Shows and Events Widget scored68%from 54 tests.

About plugin

  • Plugin page: planaby-shows-and...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 5, 2013
  • Latest release: Oct 29, 2017
  • Number of updates: 25
  • Update frequency: every 61.8 days
  • Top authors: jtayler (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /886 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼10.03ms] Passed 4 tests

Server-side resources used by Planaby Shows and Events Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.33 ▼11.33
Dashboard /wp-admin3.40 ▲0.1054.30 ▼32.64
Posts /wp-admin/edit.php3.52 ▲0.1650.57 ▲2.76
Add New Post /wp-admin/post-new.php5.99 ▲0.1095.46 ▲7.49
Media Library /wp-admin/upload.php3.33 ▲0.0936.25 ▲1.09
Planaby Settings /wp-admin/options-general.php?page=planaby3.2933.04

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 61 new files
Database: 1 new table, 8 new options
New tables
wp_planaby
New WordPress options
db_upgraded
theysaidso_admin_options
widget_planabywidget
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
planaby_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Planaby Shows and Events Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18414.68 ▲0.3933.89 ▲31.8842.94 ▼1.32
Dashboard /wp-admin2,214 ▲265.85 ▲0.03101.38 ▲0.3441.03 ▼0.17
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0233.88 ▼2.0734.66 ▼0.78
Add New Post /wp-admin/post-new.php1,538 ▲2423.14 ▲5.58648.73 ▼11.6766.13 ▼1.19
Media Library /wp-admin/upload.php1,394 ▲64.17 ▼0.04103.92 ▼7.0943.65 ▼0.31
Planaby Settings /wp-admin/options-general.php?page=planaby7882.2029.1628.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_planaby
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_planabywidget
    • planaby_db_version
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/planaby-shows-and-events-widget/planaby.php:18
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/planaby-shows-and-events-widget/planaby.php on line 15

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/options-general.php?page=planaby
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=planaby 159:8 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: mobile, shows, search, iphone, events...

planaby-shows-and-events-widget/planaby.php 92% from 13 tests

The main PHP script in "Planaby Shows and Events Widget" version 2.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("planaby-shows-and-events-widget.php" instead of "planaby.php")

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
Success! There were no dangerous files found in this plugin19,405 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript92,1761,02010,424
CSS101062068,280
PHP18545413
SVG100288

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity22.67
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity6.91
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
19 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/ui-bg_flat_50_5c5c5c_40x100.png0.22KB0.08KB▼ 62.17%
resources/images/ui-bg_highlight-soft_80_eeeeee_1x100.png0.27KB0.13KB▼ 51.45%
resources/planaby.png7.25KB3.70KB▼ 49.00%
resources/images/ui-icons_4b8e0b_256x240.png4.44KB4.17KB▼ 6.02%
resources/PlanabyButton_32.png2.38KB1.44KB▼ 39.44%