84% syntaxhighlighter-evolved-swift-brush

Code Review | SyntaxHighlighter Evolved: Swift Brush

WordPress plugin SyntaxHighlighter Evolved: Swift Brush scored84%from 54 tests.

About plugin

  • Plugin page: syntaxhighlighter...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2014
  • Latest release: Aug 22, 2014
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: randexdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,969 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by SyntaxHighlighter Evolved: Swift Brush
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.28 ▲3.08
Dashboard /wp-admin3.32 ▲0.0144.97 ▼1.12
Posts /wp-admin/edit.php3.37 ▲0.0145.28 ▼1.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.97 ▼19.46
Media Library /wp-admin/upload.php3.24 ▲0.0134.34 ▼2.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SyntaxHighlighter Evolved: Swift Brush
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.32 ▼1.272.24 ▼0.0244.16 ▼6.12
Dashboard /wp-admin2,209 ▲185.85 ▼0.08101.29 ▲2.0439.73 ▼5.32
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0037.86 ▼5.0132.29 ▼2.87
Add New Post /wp-admin/post-new.php1,519 ▼1423.54 ▲0.27644.26 ▼10.0854.58 ▲1.96
Media Library /wp-admin/upload.php1,385 ▼64.16 ▼0.0995.90 ▼8.3544.74 ▲0.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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
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
Almost there! Just 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_action() in wp-content/plugins/syntaxhighlighter-evolved-swift-brush/syntaxhighlighter-swift.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Example code.)
The official readme.txt is a good inspiration

syntaxhighlighter-evolved-swift-brush/syntaxhighlighter-swift.php 92% from 13 tests

The main file in "SyntaxHighlighter Evolved: Swift Brush" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("syntaxhighlighter-evolved-swift-brush.php" instead of "syntaxhighlighter-swift.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin45 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript181134
PHP192411

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png11.68KB5.04KB▼ 56.82%