84% xmas-lights

Code Review | Xmas Lights

WordPress plugin Xmas Lights scored 84% from 54 tests.

About plugin

  • Plugin page: xmas-lights
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9
  • WordPress version: 6.3.1
  • First release: Dec 20, 2011
  • Latest release: Mar 24, 2018
  • Number of updates: 11
  • Update frequency: every 207.8 days
  • Top authors: graphicedit (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

50+ active / 41,673 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.92ms] Passed 4 tests

This is a short check of server-side resources used by Xmas Lights
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.93 ▼0.22
Dashboard /wp-admin3.31 ▲0.0046.71 ▼4.92
Posts /wp-admin/edit.php3.36 ▲0.0047.12 ▼3.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.87 ▼2.96
Media Library /wp-admin/upload.php3.23 ▲0.0037.65 ▲0.01

Server storage [IO: ▲0.15MB] [DB: ▲0.07MB] 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
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Xmas Lights
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.74 ▲0.361.68 ▼0.1242.88 ▲2.11
Dashboard /wp-admin2,206 ▲214.88 ▼0.01109.25 ▼3.6239.84 ▼3.21
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0339.45 ▼0.6534.69 ▼2.64
Add New Post /wp-admin/post-new.php1,537 ▲2323.30 ▲5.79660.76 ▲21.3766.10 ▲0.84
Media Library /wp-admin/upload.php1,382 ▼64.25 ▲0.0696.47 ▲2.2140.35 ▼0.22

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

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

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 | 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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_is_mobile() in wp-content/plugins/xmas-lights/xmas-lights.php:58

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Xmas Lights.) image missing
Please take inspiration from this readme.txt

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

The entry point to "Xmas Lights" version 1.0.3 is a PHP file that has certain tags in its header comment area
29 characters long description:
This plugin adds Xmas Lights.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1152226

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
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
1 PNG file occupies 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
light.png103.51KB33.65KB▼ 67.49%