83% dark-mode-karen-lite

Code Review | Night Mode Karen Lite

WordPress plugin Night Mode Karen Lite scored 83% from 54 tests.

About plugin

  • Plugin page: dark-mode-karen-lite
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.8.1
  • First release: Nov 16, 2021
  • Latest release: Nov 16, 2021
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: khateroshan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 23 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.17MB] [CPU: ▲493.63ms] 50% from 4 tests

A check of server-side resources used by Night Mode Karen Lite
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 561.84ms on /wp-admin/tools.php?page=csf-welcome)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 493.63ms on /wp-admin/admin.php?page=aras_p_night_mode_lite#tab=global)
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲1.25670.95 ▲648.79
Dashboard /wp-admin4.26 ▲1.20605.32 ▲558.96
Posts /wp-admin/edit.php4.31 ▲1.21601.52 ▲555.52
Add New Post /wp-admin/post-new.php6.56 ▲1.13863.34 ▲211.25
Media Library /wp-admin/upload.php4.15 ▲1.141,459.42 ▲1,428.47
Codestar Framework /wp-admin/tools.php?page=csf-welcome4.16561.84

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 153 new files
Database: no new tables, 1 new option
New WordPress options
aras_p_night_mode_lite

Browser metrics Passed 4 tests

An overview of browser requirements for Night Mode Karen Lite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,891 ▲29516.34 ▲0.8315.25 ▲4.7247.83 ▼1.11
Dashboard /wp-admin3,033 ▲1025.88 ▼0.27132.34 ▼6.87140.15 ▲29.25
Posts /wp-admin/edit.php2,821 ▲852.73 ▲0.0163.05 ▼2.2386.98 ▼3.15
Add New Post /wp-admin/post-new.php2,568 ▲69221.01 ▲1.75392.45 ▲3.57114.33 ▼2.87
Media Library /wp-admin/upload.php1,821 ▲145.00 ▼0.02136.00 ▼14.44125.25 ▲10.02
Advanced /wp-admin/admin.php?page=aras_p_night_mode_lite#tab=advanced1,8914.4288.99101.76
Codestar Framework /wp-admin/tools.php?page=csf-welcome2,0444.1573.53149.01
See More /wp-admin/admin.php?page=aras_p_night_mode_lite#tab=see-more1,8824.1481.77100.48
Global /wp-admin/admin.php?page=aras_p_night_mode_lite#tab=global2,1404.53100.93104.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • aras_p_night_mode_lite

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
Good news, no errors were detected

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-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ArasGroupNightModeLite\\add_action() in wp-content/plugins/dark-mode-karen-lite/inc/class/core/FrontSide.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can take inspiration from this readme.txt

dark-mode-karen-lite/index.php 77% from 13 tests

The primary PHP file in "Night Mode Karen Lite" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Main file name: Name the main plugin file the same as the plugin slug ("dark-mode-karen-lite.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected17,636 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP732,1549799,239
PO File243,5624,0767,319
Markdown2850379
Sass2220273
CSS52131264
JavaScript3433143
SVG44019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity20.40
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity6.62
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods190
▷ Static methods4021.05%
▷ Public methods18999.47%
▷ Protected methods00.00%
▷ Private methods10.53%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/resources/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%