10% happy-new-year

Code Review | Happy New Year

WordPress plugin Happy New Year scored10%from 54 tests.

About plugin

  • Plugin page: happy-new-year
  • Plugin version: 5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Dec 24, 2013
  • Latest release: Dec 8, 2016
  • Number of updates: 32
  • Update frequency: every 45.7 days
  • Top authors: melihbey (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /10,543 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/happy-new-year/happynewyear.php+65
    Use of undefined constant wp_head - assumed 'wp_head' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.95MB] [CPU: ▼57.07ms] Passed 4 tests

An overview of server-side resources used by Happy New Year
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.35 ▼35.77
Dashboard /wp-admin2.07 ▼1.275.71 ▼60.17
Posts /wp-admin/edit.php2.07 ▼1.285.39 ▼42.75
Add New Post /wp-admin/post-new.php2.07 ▼3.826.25 ▼89.57
Media Library /wp-admin/upload.php2.07 ▼1.166.00 ▼30.54

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Happy New Year
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,124 ▲37813.67 ▼0.7013.13 ▲11.2245.73 ▲1.68
Dashboard /wp-admin2,203 ▲125.83 ▲0.0196.66 ▼5.6137.06 ▼5.22
Posts /wp-admin/edit.php2,092 ▲62.01 ▲0.0135.16 ▼0.6432.85 ▼2.07
Add New Post /wp-admin/post-new.php1,514 ▼1917.63 ▼5.81701.45 ▲90.4463.65 ▲1.50
Media Library /wp-admin/upload.php1,391 ▼04.23 ▼0.0195.20 ▼7.3941.45 ▼6.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/happy-new-year/happynewyear.php+65
    Use of undefined constant wp_head - assumed 'wp_head' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happy-new-year/happynewyear.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: happy christmas, countdown, happy new year, merry christmas, song...

happy-new-year/happynewyear.php 92% from 13 tests

Analyzing the main PHP file in "Happy New Year" version 5.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("happy-new-year.php" instead of "happynewyear.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin597 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript46130552
PHP191245

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.31MB with 0.22MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
rightimg.png104.16KB26.92KB▼ 74.16%
leftimg.png93.68KB25.02KB▼ 73.29%
centerimg.png115.55KB37.82KB▼ 67.27%