83% igsyntax-hiliter

Code Review | iG:Syntax Hiliter

WordPress plugin iG:Syntax Hiliter scored83%from 54 tests.

About plugin

  • Plugin page: igsyntax-hiliter
  • Plugin version: 5.1
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9
  • WordPress version: 6.3.1
  • First release: Jan 29, 2013
  • Latest release: May 7, 2022
  • Number of updates: 27
  • Update frequency: every 125.4 days
  • Top authors: amit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /6,817 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▲1.87ms] Passed 4 tests

A check of server-side resources used by iG:Syntax Hiliter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7542.63 ▲2.17
Dashboard /wp-admin3.55 ▲0.2450.01 ▲3.73
Posts /wp-admin/edit.php3.60 ▲0.2450.68 ▲2.70
Add New Post /wp-admin/post-new.php6.07 ▲0.1893.70 ▲4.26
Media Library /wp-admin/upload.php3.41 ▲0.1835.49 ▼1.12
iG:Syntax Hiliter /wp-admin/options-general.php?page=ig-syntax-hiliter-page3.4134.28

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 74 new files
Database: no new tables, 10 new options
New WordPress options
ig-syntax-hiliter-lang-time
ig-syntax-hiliter-options
theysaidso_admin_options
can_compress_scripts
igsh-cache-12f9a235b97059bd720b231411cab867
widget_recent-comments
widget_theysaidso_widget
ig-syntax-hiliter-version
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by iG:Syntax Hiliter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.32 ▼1.241.76 ▼0.0744.43 ▲1.12
Dashboard /wp-admin2,207 ▲165.91 ▲0.85112.68 ▲10.0246.15 ▲0.01
Posts /wp-admin/edit.php2,090 ▲12.05 ▼0.1435.78 ▼6.9331.41 ▼5.58
Add New Post /wp-admin/post-new.php1,536 ▼823.05 ▲4.61640.29 ▲3.1855.16 ▼3.55
Media Library /wp-admin/upload.php1,389 ▲14.22 ▼0.0597.44 ▼0.7842.21 ▼2.57
iG:Syntax Hiliter /wp-admin/options-general.php?page=ig-syntax-hiliter-page1,0671.6824.6527.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 10 options in the database
    • theysaidso_admin_options
    • ig-syntax-hiliter-options
    • igsh-cache-12f9a235b97059bd720b231411cab867
    • ig-syntax-hiliter-version
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • ig-syntax-hiliter-lang-time
    • 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 no errors were found, this is by no means 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 fix the following items
  • 295× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant GESHI_BEFORE - assumed 'GESHI_BEFORE' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/ini.php on line 117
    • > PHP Warning
      Use of undefined constant GESHI_COMMENTS - assumed 'GESHI_COMMENTS' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/sql.php on line 116
    • > PHP Warning
      Use of undefined constant GESHI_NEVER - assumed 'GESHI_NEVER' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/java.php on line 976
    • > PHP Warning
      Use of undefined constant GESHI_NEVER - assumed 'GESHI_NEVER' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/python.php on line 237
    • > PHP Warning
      Use of undefined constant GESHI_REPLACE - assumed 'GESHI_REPLACE' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/ruby.php on line 213
    • > PHP Warning
      Use of undefined constant GESHI_NUMBER_FLT_SCI_SHORT - assumed 'GESHI_NUMBER_FLT_SCI_SHORT' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/cpp.php on line 79
    • > PHP Warning
      Use of undefined constant GESHI_CAPS_NO_CHANGE - assumed 'GESHI_CAPS_NO_CHANGE' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/postgresql.php on line 45
    • > PHP Warning
      Use of undefined constant GESHI_NUMBER_FLT_NONSCI_F - assumed 'GESHI_NUMBER_FLT_NONSCI_F' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/c.php on line 245
    • > PHP Warning
      Use of undefined constant GESHI_NUMBER_FLT_SCI_SHORT - assumed 'GESHI_NUMBER_FLT_SCI_SHORT' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/c.php on line 85
    • > PHP Warning
      Use of undefined constant GESHI_NUMBER_FLT_SCI_ZERO - assumed 'GESHI_NUMBER_FLT_SCI_ZERO' (this will throw an Error in a future version of PHP) in wp-content/plugins/igsyntax-hiliter/geshi/php.php on line 1030

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: javascript, syntax highlighter, php, html, code...

igsyntax-hiliter/ig-syntax-hiliter.php 85% from 13 tests

The main PHP file in "iG:Syntax Hiliter" ver. 5.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 222 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("igsyntax-hiliter.php" instead of "ig-syntax-hiliter.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin14,567 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP531,3744,63413,959
JavaScript55075204
Sass5300175
Markdown2860169
CSS33248
Ruby171512

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 199)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity63.46
▷ Minimum class complexity2.00
▷ Maximum class complexity637.00
Average method complexity5.65
▷ Minimum method complexity1.00
▷ Maximum method complexity199.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes110.00%
Methods175
▷ Static methods148.00%
▷ Public methods14381.71%
▷ Protected methods3017.14%
▷ Private methods21.14%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants69
▷ Global constants5985.51%
▷ Class constants1014.49%
▷ Public constants10100.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
No PNG images were found in this plugin