79% syntaxhighlighter-evolved-spacegray

Code Review | SyntaxHighlighter - Spacegray

WordPress plugin SyntaxHighlighter - Spacegray scored79%from 54 tests.

About plugin

  • Plugin page: syntaxhighlighter...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.9
  • WordPress version: 6.3.1
  • First release: Jan 28, 2014
  • Latest release: Apr 16, 2014
  • Number of updates: 5
  • Update frequency: every 15.6 days
  • Top authors: Manoz69 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,821 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.94MB] [CPU: ▼57.46ms] Passed 4 tests

This is a short check of server-side resources used by SyntaxHighlighter - Spacegray
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.17 ▼40.34
Dashboard /wp-admin2.07 ▼1.245.37 ▼46.20
Posts /wp-admin/edit.php2.07 ▼1.295.64 ▼48.71
Add New Post /wp-admin/post-new.php2.07 ▼3.826.14 ▼94.58
Media Library /wp-admin/upload.php2.07 ▼1.165.78 ▼34.95

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SyntaxHighlighter - Spacegray
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.20 ▼1.191.75 ▼0.3144.28 ▼0.19
Dashboard /wp-admin2,209 ▲185.86 ▲0.0299.57 ▼4.1539.99 ▼2.18
Posts /wp-admin/edit.php2,092 ▼01.96 ▼0.0838.70 ▼3.6136.35 ▼2.86
Add New Post /wp-admin/post-new.php1,521 ▲223.12 ▼0.17698.14 ▲81.6557.73 ▲5.54
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.06101.91 ▼4.0743.78 ▼4.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_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 syntaxhighlighter-theme-spacegray handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

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
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

syntaxhighlighter-evolved-spacegray/syntaxhighlighter-spacegray.php 92% from 13 tests

"SyntaxHighlighter - Spacegray" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("syntaxhighlighter-evolved-spacegray.php" instead of "syntaxhighlighter-spacegray.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin351 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS29126325
PHP291726

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ScreenShot02.png52.93KB22.25KB▼ 57.96%
ScreenShot01.png53.32KB22.33KB▼ 58.11%