90% christmas-blocks

Code Review | Christmas Blocks

WordPress plugin Christmas Blocks scored90%from 54 tests.

About plugin

  • Plugin page: christmas-blocks
  • Plugin version: 1.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 17, 2018
  • Latest release: Dec 17, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: poena (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,559 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.27MB] [CPU: ▼11.23ms] Passed 4 tests

Server-side resources used by Christmas Blocks
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.48 ▼3.92
Dashboard /wp-admin3.31 ▲0.0151.04 ▲3.16
Posts /wp-admin/edit.php3.36 ▲0.0048.51 ▼0.31
Add New Post /wp-admin/post-new.php4.80 ▼1.0855.46 ▼37.40
Media Library /wp-admin/upload.php3.23 ▲0.0032.27 ▼3.27

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Christmas Blocks: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.25 ▼0.131.70 ▼0.1141.76 ▼2.67
Dashboard /wp-admin2,192 ▲125.57 ▼0.0386.82 ▼2.1546.20 ▲3.84
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0233.59 ▼0.9037.12 ▼2.10
Add New Post /wp-admin/post-new.php6,201 ▲4,67326.01 ▲2.73908.67 ▲288.5852.33 ▼7.95
Media Library /wp-admin/upload.php1,400 ▲34.11 ▼0.09100.48 ▲0.7840.85 ▼4.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: christmas, blocks

christmas-blocks/christmas.php 92% from 13 tests

The main PHP file in "Christmas Blocks" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("christmas-blocks.php" instead of "christmas.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
Everything looks great! No dangerous files found in this plugin206 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1357156
PHP171446
CSS1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/assorted_candies.png12.95KB4.45KB▼ 65.62%
images/christmastree.png5.91KB2.78KB▼ 52.93%
images/candycaneheart.png22.02KB1.76KB▼ 92.01%
images/snowman.png8.08KB3.44KB▼ 57.42%
images/santa.png15.26KB5.48KB▼ 64.09%