84% christmas-lights

Code Review | Christmas Lights

WordPress plugin Christmas Lights scored84%from 54 tests.

About plugin

  • Plugin page: christmas-lights
  • Plugin version: 0.8.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Dec 15, 2011
  • Latest release: Nov 9, 2017
  • Number of updates: 17
  • Update frequency: every 126.8 days
  • Top authors: d3wp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /16,634 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Christmas Lights
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.74 ▼1.68
Dashboard /wp-admin3.31 ▼0.0444.36 ▼13.25
Posts /wp-admin/edit.php3.36 ▲0.0048.44 ▼1.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.01 ▼14.83
Media Library /wp-admin/upload.php3.23 ▲0.0035.90 ▲1.65

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Christmas Lights: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4413.66 ▼0.725.12 ▲3.1143.61 ▼0.46
Dashboard /wp-admin2,212 ▲245.90 ▲0.0298.40 ▼3.3540.58 ▼4.98
Posts /wp-admin/edit.php2,092 ▲32.03 ▼0.0137.12 ▼3.9135.88 ▼0.66
Add New Post /wp-admin/post-new.php1,518 ▲417.38 ▼0.51665.91 ▲16.6155.08 ▲9.67
Media Library /wp-admin/upload.php1,394 ▲94.20 ▲0.0096.39 ▼28.6441.84 ▼6.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Even though no errors were found, 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/christmas-lights/christmas-lights.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: snowing, christmas lights, christmas, winter, snow

christmas-lights/christmas-lights.php Passed 13 tests

The main PHP script in "Christmas Lights" version 0.8.3 is automatically included on every request by WordPress
87 characters long description:
Add nice looking animated Christmas lights to the top of your WP site and enjoy winter.

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
No dangerous file extensions were detected47 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15033
PHP13914

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were 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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin