93% christmas-template

Code Review | Tea noel

WordPress plugin Tea noel scored 93% from 54 tests.

About plugin

  • Plugin page: christmas-template
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 5.8.1
  • First release: Dec 22, 2016
  • Latest release: Dec 22, 2016
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: khicononline9x (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,744 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼143.49ms] Passed 4 tests

This is a short check of server-side resources used by Tea noel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0433.89 ▲0.22
Dashboard /wp-admin3.08 ▲0.0339.88 ▼6.99
Posts /wp-admin/edit.php3.14 ▲0.0341.27 ▼4.00
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.57 ▼557.80
Media Library /wp-admin/upload.php3.03 ▲0.0330.31 ▼5.16

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 37 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Tea noel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,434 ▲83816.58 ▲0.9630.26 ▲19.7655.80 ▲3.47
Dashboard /wp-admin2,967 ▲385.85 ▼0.13140.37 ▼11.48111.28 ▲9.47
Posts /wp-admin/edit.php2,739 ▲32.71 ▼0.0063.24 ▼6.2485.52 ▼5.15
Add New Post /wp-admin/post-new.php1,683 ▲18518.51 ▼0.26397.20 ▲18.55108.86 ▼6.45
Media Library /wp-admin/upload.php1,807 ▲35.02 ▼0.01148.22 ▲4.36122.30 ▲5.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/christmas-template/tea-noel.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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 important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === christmas-template === )
The official readme.txt is a good inspiration

christmas-template/tea-noel.php 92% from 13 tests

The main PHP file in "Tea noel" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("christmas-template.php" instead of "tea-noel.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
No dangerous file extensions were detected379 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1110156
JavaScript363140
CSS13183

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
22 PNG files occupy 3.00MB with 0.69MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/b-ball_n5.png3.15KB2.60KB▼ 17.62%
assets/images/b-ball_i6.png1.06KB1.54KB0.00%
assets/images/b-ball_i2.png2.57KB2.36KB▼ 8.02%
assets/images/b-head-decor_newyear.png68.41KB25.82KB▼ 62.26%
assets/images/b-ball_i5.png3.72KB2.73KB▼ 26.46%