73% cybro-wp-easy-dark-mode

Code Review | Cybro WP Easy Dark Mode

WordPress plugin Cybro WP Easy Dark Mode scored73%from 54 tests.

About plugin

  • Plugin page: cybro-wp-easy-dar...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Nov 18, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: cybrosys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /165 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.23MB] [CPU: ▼44.65ms] Passed 4 tests

An overview of server-side resources used by Cybro WP Easy Dark Mode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7113.56 ▼22.14
Dashboard /wp-admin2.79 ▼0.5615.65 ▼43.38
Posts /wp-admin/edit.php2.80 ▼0.5717.04 ▼28.21
Add New Post /wp-admin/post-new.php2.79 ▼3.1017.89 ▼84.76
Media Library /wp-admin/upload.php2.79 ▼0.4413.71 ▼22.26

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cybro WP Easy Dark Mode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7514.42 ▼0.241.93 ▲0.4236.65 ▼4.40
Dashboard /wp-admin2,213 ▲335.59 ▼0.0386.88 ▲0.3638.25 ▼5.57
Posts /wp-admin/edit.php2,118 ▲182.01 ▲0.0332.05 ▼3.7731.55 ▼4.54
Add New Post /wp-admin/post-new.php1,549 ▲2124.97 ▲1.74596.93 ▼71.7980.72 ▲16.93
Media Library /wp-admin/upload.php1,415 ▲154.27 ▲0.1195.89 ▼3.7043.47 ▼1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/cybro-wp-easy-dark-mode/dark-dash.php+101
    date_default_timezone_set(): Timezone ID '+00:00' is invalid
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cybro-wp-easy-dark-mode/dark-dash.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Dashboard /assets/dashboard2022-11-14 164306.png), #2 (Plugins /assets/plugins2022-11-14 164754.png), #3 (Themes /assets/themes2022-11-14 164946.png), #4 (WooCommerce /assets/woocommerce2022-11-14 170302.png), #5 (Jetpack /assets/jetpack2022-11-14 165918.png)
You can take inspiration from this readme.txt

cybro-wp-easy-dark-mode/dark-dash.php 92% from 13 tests

The main PHP file in "Cybro WP Easy Dark Mode" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cybro-wp-easy-dark-mode.php" instead of "dark-dash.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected3,875 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
Sass43741,884
CSS146001,876
PHP1181192
JavaScript15023

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.80MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/woocommerce2022-11-14 170302.png309.16KB102.92KB▼ 66.71%
assets/dashboard2022-11-14 164306.png106.56KB39.96KB▼ 62.50%
assets/plugins2022-11-14 164754.png110.25KB45.42KB▼ 58.81%
assets/themes2022-11-14 164946.png245.82KB77.12KB▼ 68.63%
assets/jetpack2022-11-14 165918.png43.06KB16.94KB▼ 60.65%