84% horizontal-line-styles

Code Review | Horizontal Line Styles

WordPress plugin Horizontal Line Styles scored84%from 54 tests.

About plugin

  • Plugin page: horizontal-line-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 23, 2015
  • Latest release: Sep 23, 2015
  • Number of updates: 4
  • Update frequency: every 69.3 days
  • Top authors: warmarks (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,757 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.04ms] Passed 4 tests

An overview of server-side resources used by Horizontal Line Styles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.73 ▲1.99
Dashboard /wp-admin3.34 ▲0.0355.13 ▲5.02
Posts /wp-admin/edit.php3.39 ▲0.0349.35 ▲0.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.22 ▼2.54
Media Library /wp-admin/upload.php3.26 ▲0.0337.68 ▼0.36
Hr Line Styles /wp-admin/themes.php?page=wmhr_styles_settings3.2333.53

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Horizontal Line Styles: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.35 ▲0.001.71 ▲0.0544.12 ▲1.23
Dashboard /wp-admin2,206 ▲325.63 ▲0.0491.13 ▲1.1139.36 ▲1.01
Posts /wp-admin/edit.php2,108 ▲82.01 ▼0.0235.95 ▲0.7934.48 ▼3.82
Add New Post /wp-admin/post-new.php1,534 ▲823.07 ▲0.12660.15 ▼47.7268.05 ▲14.68
Media Library /wp-admin/upload.php1,408 ▲114.24 ▲0.09104.37 ▼15.2247.51 ▼1.22
Hr Line Styles /wp-admin/themes.php?page=wmhr_styles_settings9902.0524.5337.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/horizontal-line-styles/hr-styles.php:13

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

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: horisontal line, tinymce, hr, horizontal rule, hr style

horizontal-line-styles/hr-styles.php 92% from 13 tests

The primary PHP file in "Horizontal Line Styles" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("horizontal-line-styles.php" instead of "hr-styles.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected432 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP17213289
CSS2330143

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/h-12.png2.76KB0.10KB▼ 96.25%
img/h-11.png2.75KB0.11KB▼ 96.17%