84% horizontal-line-shortcode

Code Review | Horizontal Line Shortcode

WordPress plugin Horizontal Line Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: horizontal-line-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Sep 12, 2015
  • Latest release: May 20, 2016
  • Number of updates: 7
  • Update frequency: every 35.9 days
  • Top authors: mikakaltoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,575 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Horizontal Line Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.93 ▼2.57
Dashboard /wp-admin3.31 ▼0.0346.39 ▼16.77
Posts /wp-admin/edit.php3.36 ▲0.0146.64 ▲2.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.41 ▼18.06
Media Library /wp-admin/upload.php3.23 ▲0.0132.32 ▼1.49

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Horizontal Line Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.77 ▲0.381.76 ▼0.1343.73 ▼1.39
Dashboard /wp-admin2,209 ▲215.10 ▲0.22101.26 ▼9.5641.43 ▼2.50
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0234.82 ▼2.9735.84 ▼1.53
Add New Post /wp-admin/post-new.php1,543 ▲2418.28 ▼4.95632.00 ▼40.2048.14 ▼7.05
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0897.42 ▼16.1642.85 ▼5.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/horizontal-line-shortcode/horizontal-line-shortcode.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: post, page, shortocde, tags, text...

horizontal-line-shortcode/horizontal-line-shortcode.php 92% from 13 tests

The primary PHP file in "Horizontal Line Shortcode" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122723

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.89
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin