84% christmas-panda

Code Review | Christmas Panda

WordPress plugin Christmas Panda scored84%from 54 tests.

About plugin

  • Plugin page: christmas-panda
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 29, 2016
  • Latest release: Nov 6, 2020
  • Number of updates: 23
  • Update frequency: every 62.4 days
  • Top authors: pixolette (91.3%)ionvv (13.04%)

Code review

54 tests

User reviews

15 reviews

Install metrics

500+ active /25,587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.72ms] Passed 4 tests

This is a short check of server-side resources used by Christmas Panda
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.54 ▲1.31
Dashboard /wp-admin3.31 ▲0.0149.86 ▲1.45
Posts /wp-admin/edit.php3.36 ▲0.0151.65 ▼5.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.52 ▼7.77
Media Library /wp-admin/upload.php3.23 ▲0.0138.19 ▲1.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 63 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
pix_cp_options

Browser metrics Passed 4 tests

A check of browser resources used by Christmas Panda
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲31913.64 ▼0.6712.10 ▲10.0943.73 ▼1.43
Dashboard /wp-admin2,221 ▲365.81 ▲0.8799.81 ▼2.3736.38 ▼7.53
Posts /wp-admin/edit.php2,110 ▲212.04 ▲0.0041.84 ▲2.8536.32 ▼2.58
Add New Post /wp-admin/post-new.php1,553 ▲2018.38 ▼4.86618.97 ▼75.0957.45 ▲1.27
Media Library /wp-admin/upload.php1,400 ▲124.26 ▼0.1597.66 ▼7.7843.03 ▼3.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • pix_cp_options
    • db_upgraded

Smoke tests 75% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/christmas-panda/_views/cp-backend.php
    • > /wp-content/plugins/christmas-panda/base.php
    • > /wp-content/plugins/christmas-panda/_models/cp-main.php
    • > /wp-content/plugins/christmas-panda/_controllers/cp-controller.php
    • > /wp-content/plugins/christmas-panda/_views/cp-frontend.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt is a good inspiration

christmas-panda/base.php 92% from 13 tests

The main PHP file in "Christmas Panda" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("christmas-panda.php" instead of "base.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin596 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP565118346
CSS420196
JavaScript47754

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.36
Average class complexity10.00
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.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 Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
47 compressed PNG files occupy 3.39MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/snowflake_9.png14.29KB15.95KB0.00%
assets/images/popup_7.png45.19KB46.49KB0.00%
assets/images/popup_15.png43.27KB45.29KB0.00%
assets/images/snowflake_2.png42.10KB43.81KB0.00%
assets/images/popup_12.png44.02KB45.47KB0.00%