84% easy-dark-mode-on-one-click

Code Review | Easy Dark Mode on One Click

WordPress plugin Easy Dark Mode on One Click scored84%from 54 tests.

About plugin

  • Plugin page: easy-dark-mode-on...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 22, 2020
  • Latest release: Oct 22, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: vikrantrathour (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Easy Dark Mode on One Click
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.78 ▼5.09
Dashboard /wp-admin3.31 ▲0.0044.74 ▼0.77
Posts /wp-admin/edit.php3.36 ▲0.0045.43 ▲0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.09 ▼9.67
Media Library /wp-admin/upload.php3.23 ▲0.0036.45 ▲4.60

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

A short overview of filesystem and database impact
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
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Dark Mode on One Click
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.61 ▼0.752.21 ▲0.2640.78 ▼5.79
Dashboard /wp-admin2,206 ▲215.83 ▲0.02106.14 ▲0.9937.62 ▼5.50
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0235.82 ▼0.3233.69 ▼4.61
Add New Post /wp-admin/post-new.php1,541 ▲818.52 ▼4.65668.90 ▲24.0355.83 ▼2.10
Media Library /wp-admin/upload.php1,382 ▼64.22 ▲0.0199.67 ▲0.2242.98 ▼2.19

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-dark-mode-on-one-click/easy-dark-mode.php

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 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: dark mode, night mode, black theme, night theme, night...

easy-dark-mode-on-one-click/easy-dark-mode.php 85% from 13 tests

This is the main PHP file of "Easy Dark Mode on One Click" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-dark-mode-on-one-click.php" instead of "easy-dark-mode.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected35 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14017
PHP172212
CSS1006

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.33
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

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