83% halloween-panda

Code Review | Halloween Panda

WordPress plugin Halloween Panda scored 83% from 54 tests.

About plugin

  • Plugin page: halloween-panda
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2016
  • Latest release: Oct 16, 2020
  • Number of updates: 33
  • Update frequency: every 44.1 days
  • Top authors: pixolette (81.82%)ionvv (21.21%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 5,454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.72ms] Passed 4 tests

Analyzing server-side resources used by Halloween Panda
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.49 ▲1.14
Dashboard /wp-admin3.36 ▲0.0545.77 ▼6.08
Posts /wp-admin/edit.php3.41 ▲0.0547.29 ▼0.66
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.78 ▼4.65
Media Library /wp-admin/upload.php3.28 ▲0.0534.51 ▼3.48

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Halloween Panda
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲22513.59 ▼0.7811.14 ▲9.0443.37 ▼7.21
Dashboard /wp-admin2,224 ▲334.83 ▼1.08105.80 ▼0.5140.17 ▼6.45
Posts /wp-admin/edit.php2,107 ▲212.17 ▲0.1839.74 ▲4.4934.04 ▼1.69
Add New Post /wp-admin/post-new.php1,553 ▲3923.24 ▲5.58651.30 ▼45.0452.65 ▼2.41
Media Library /wp-admin/upload.php1,406 ▲184.21 ▲0.03105.30 ▲3.1546.27 ▲0.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • pix_hp_options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/halloween-panda/_controllers/hp-controller.php
    • > /wp-content/plugins/halloween-panda/_views/hp-frontend.php
    • > /wp-content/plugins/halloween-panda/_models/hp-main.php
    • > /wp-content/plugins/halloween-panda/_views/hp-backend.php
    • > /wp-content/plugins/halloween-panda/base.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (19 tag instead of maximum 10)
The official readme.txt is a good inspiration

halloween-panda/base.php 77% from 13 tests

The principal PHP file in "Halloween Panda" v. 1.0.6 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("halloween-panda.php" instead of "base.php")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("halloween-panda")
  • Domain Path: Please prefix the domain path with a forward slash character ("/halloween-panda")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected9,573 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
SVG82168,885
PHP566120432
CSS410219
JavaScript44737

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.87MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon_carrots.png103.53KB36.94KB▼ 64.32%
assets/images/popup_2.png72.69KB26.54KB▼ 63.49%
assets/images/icon_ghosts.png156.87KB62.43KB▼ 60.20%
assets/images/icon_pumpkins.png146.58KB55.51KB▼ 62.13%
assets/images/dark_world.png37.26KB17.70KB▼ 52.51%