84% dark-mode-for-elementor

Code Review | Dark Mode for Elementor

WordPress plugin Dark Mode for Elementor scored84%from 54 tests.

About plugin

  • Plugin page: dark-mode-for-ele...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2020
  • Latest release: Jul 14, 2020
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: develowp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,808 total downloads


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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Dark Mode for Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.22 ▼2.47
Dashboard /wp-admin3.31 ▲0.0148.35 ▲0.90
Posts /wp-admin/edit.php3.36 ▲0.0057.22 ▲10.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.61 ▼7.70
Media Library /wp-admin/upload.php3.23 ▲0.0033.39 ▼0.62

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Dark Mode for Elementor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.23 ▼1.144.59 ▲2.8538.54 ▼4.58
Dashboard /wp-admin2,227 ▲355.87 ▲0.94103.60 ▼10.2839.26 ▼4.85
Posts /wp-admin/edit.php2,109 ▲172.00 ▲0.0141.61 ▼0.5135.06 ▲0.78
Add New Post /wp-admin/post-new.php1,546 ▲1322.98 ▼0.02654.48 ▲45.7761.05 ▲12.28
Media Library /wp-admin/upload.php1,400 ▲124.30 ▲0.0999.26 ▲1.4844.04 ▲0.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DWP_Elementor_DM\\add_action() in wp-content/plugins/dark-mode-for-elementor/plugin.php:157

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: light mode, blackout, elementor, dark mode

dark-mode-for-elementor/develowp-elementor-dm.php 85% from 13 tests

The entry point to "Dark Mode for Elementor" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dark-mode-for-elementor.php" instead of "develowp-elementor-dm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin942 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.40
▷ Minimum class complexity4.00
▷ Maximum class complexity11.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
▷ Static methods38.33%
▷ Public methods2672.22%
▷ Protected methods719.44%
▷ Private methods38.33%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin