68% stylish-box

Code Review | Stylish Box

WordPress plugin Stylish Box scored 68% from 54 tests.

About plugin

  • Plugin page: stylish-box
  • Plugin version: 2.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: Nov 24, 2017
  • Latest release: Aug 23, 2020
  • Number of updates: 6
  • Update frequency: every 167.3 days
  • Top authors: nath4n (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 607 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.30ms] Passed 4 tests

Server-side resources used by Stylish Box
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.36 ▼36.90
Dashboard /wp-admin2.08 ▼1.227.09 ▼42.20
Posts /wp-admin/edit.php2.08 ▼1.276.24 ▼40.51
Add New Post /wp-admin/post-new.php2.08 ▼3.805.14 ▼85.57
Media Library /wp-admin/upload.php2.08 ▼1.156.59 ▼27.37
Stylish Box /wp-admin/options-general.php?page=stylish-box2.085.26

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
stylish-box-settings
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stylish Box
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.18 ▼1.404.83 ▲2.9341.35 ▼12.10
Dashboard /wp-admin2,217 ▲265.88 ▲0.9299.83 ▼14.8739.87 ▼7.38
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0136.48 ▲0.3233.06 ▲0.18
Add New Post /wp-admin/post-new.php1,371 ▼16216.60 ▼6.68554.78 ▼131.3559.81 ▲8.88
Media Library /wp-admin/upload.php1,393 ▲54.30 ▲0.0894.16 ▼13.4741.23 ▼6.36
Stylish Box /wp-admin/options-general.php?page=stylish-box8311.7228.4533.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stylish-box-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • stylish-box-settings
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=stylish-box
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stylish-box-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/stylish-box/init.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: post style, stylish box, page style, content style

stylish-box/init.php 77% from 13 tests

The main PHP file in "Stylish Box" ver. 2.00 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("stylish-box.php" instead of "init.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin293 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS204156
PHP1920137

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin