84% nightly

Code Review | WP Nightly - Dark Mode for WordPress

WordPress plugin WP Nightly - Dark Mode for WordPress scored 84% from 54 tests.

About plugin

  • Plugin page: nightly
  • Plugin version: 0.0.1-beta.3...
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: May 5, 2022
  • Latest release: May 5, 2022
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: badhonrocks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.05ms] Passed 4 tests

Server-side resources used by WP Nightly - Dark Mode for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.78 ▲2.12
Dashboard /wp-admin3.42 ▲0.1244.15 ▼9.82
Posts /wp-admin/edit.php3.53 ▲0.1848.97 ▼0.27
Add New Post /wp-admin/post-new.php6.04 ▲0.1689.01 ▼8.54
Media Library /wp-admin/upload.php3.34 ▲0.1132.23 ▼1.56
Settings /wp-admin/admin.php?page=wp_nightly3.3431.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Nightly - Dark Mode for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲12313.33 ▼1.053.94 ▲2.3035.96 ▼8.54
Dashboard /wp-admin2,247 ▲654.88 ▼0.03112.65 ▲0.5142.15 ▼3.61
Posts /wp-admin/edit.php2,131 ▲422.05 ▲0.0637.35 ▼3.7738.32 ▲2.68
Add New Post /wp-admin/post-new.php1,527 ▼1517.71 ▼0.64660.64 ▲44.0553.56 ▼12.32
Media Library /wp-admin/upload.php1,432 ▲444.27 ▼0.0399.22 ▲2.1141.56 ▼3.21
Settings /wp-admin/admin.php?page=wp_nightly1,0529.20222.0630.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPNightly\\add_action() in wp-content/plugins/nightly/inc/dashboard.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPNightly\\add_action() in wp-content/plugins/nightly/inc/frontend.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPNightly\\add_action() in wp-content/plugins/nightly/inc/settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: gutenberg blocks, dark mode, night mode, blocks

nightly/nightly.php 85% from 13 tests

The main PHP file in "WP Nightly - Dark Mode for WordPress" ver. 0.0.1-beta.3... adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "0.0.1-beta.3...")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,186 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript201502021,292
Sass29711441
PHP895190429
SVG10014
CSS60010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity3.75
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods24
▷ Static methods416.67%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected