83% short-syntax-highlighter

Code Review | Short Syntax Highlighter Shortcode

WordPress plugin Short Syntax Highlighter Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: short-syntax-high...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.2-4.5
  • WordPress version: 6.3.1
  • First release: Dec 26, 2010
  • Latest release: Apr 28, 2016
  • Number of updates: 21
  • Update frequency: every 92.9 days
  • Top authors: purab (61.9%)wordpressapi (42.86%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,471 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.63ms] Passed 4 tests

A check of server-side resources used by Short Syntax Highlighter Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.20 ▼4.54
Dashboard /wp-admin3.31 ▲0.0143.67 ▼2.85
Posts /wp-admin/edit.php3.36 ▲0.0147.20 ▼0.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.39 ▼3.02
Media Library /wp-admin/upload.php3.24 ▲0.0136.36 ▲1.88

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Short Syntax Highlighter Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.271.53 ▼0.0440.09 ▼1.70
Dashboard /wp-admin2,206 ▲184.86 ▼0.00112.04 ▲4.5742.95 ▼0.16
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0439.02 ▼1.5638.43 ▼1.39
Add New Post /wp-admin/post-new.php1,542 ▲2117.93 ▼5.57625.03 ▲10.6456.73 ▲1.48
Media Library /wp-admin/upload.php1,388 ▲64.22 ▲0.0195.76 ▼1.4342.36 ▲0.08

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/short-syntax-highlighter/short-syntaxhighlighter.php:99

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Preview of short syntax highlighter post)
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

short-syntax-highlighter/short-syntaxhighlighter.php 92% from 13 tests

The principal PHP file in "Short Syntax Highlighter Shortcode" v. 1.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("short-syntax-highlighter.php" instead of "short-syntaxhighlighter.php")

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
Success! There were no dangerous files found in this plugin78 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121078

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods240.00%
▷ Protected methods00.00%
▷ Private methods360.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png3.48KB1.38KB▼ 60.26%