56% syntax-high-lighter

Code Review | MeliBu WP Syntax High Lighter

WordPress plugin MeliBu WP Syntax High Lighter scored56%from 54 tests.

About plugin

  • Plugin page: syntax-high-lighter
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.2
  • WordPress version: 6.3.1
  • First release: May 17, 2016
  • Latest release: May 7, 2019
  • Number of updates: 44
  • Update frequency: every 24.7 days
  • Top authors: ProDeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,131 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by MeliBu WP Syntax High Lighter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.41 ▲3.81
Dashboard /wp-admin3.18 ▼0.1228.86 ▼19.39
Posts /wp-admin/edit.php3.50 ▲0.1452.88 ▲9.61
Add New Post /wp-admin/post-new.php5.98 ▲0.1096.47 ▲5.48
Media Library /wp-admin/upload.php3.18 ▼0.0527.58 ▼6.04
MB Syntax /wp-admin/admin.php?page=melibu-plugin-syntax-admin3.1726.27
About /wp-admin/admin.php?page=melibu-plugin-syntax-admin-control-menu-43.1724.94
Options /wp-admin/admin.php?page=melibu-plugin-syntax-admin-control-menu-13.1726.93

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 81 new files
Database: 1 new table, 8 new options
New tables
wp_melibu_shl
New WordPress options
melibu-plugin-syntax-version
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
melibu-plugin-syntax-db-version
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for MeliBu WP Syntax High Lighter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,996 ▲25013.72 ▼0.938.48 ▲6.6740.03 ▼1.88
Dashboard /wp-admin2,246 ▲614.96 ▼0.84101.09 ▼15.7578.89 ▲30.25
Posts /wp-admin/edit.php2,147 ▲582.22 ▲0.1637.90 ▲2.5337.41 ▲1.84
Add New Post /wp-admin/post-new.php6,431 ▲4,88927.81 ▲9.42878.98 ▲246.1937.96 ▼11.72
Media Library /wp-admin/upload.php1,433 ▲424.28 ▲0.0994.80 ▼3.2578.25 ▲33.37
MB Syntax /wp-admin/admin.php?page=melibu-plugin-syntax-admin1,1961.9428.5470.94
About /wp-admin/admin.php?page=melibu-plugin-syntax-admin-control-menu-41,4191.8326.4558.41
Options /wp-admin/admin.php?page=melibu-plugin-syntax-admin-control-menu-15,3121.8628.0990.51

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
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-includes/option.php+2520
    Undefined index: melibuPlugin_syntaxhighlighter_regexp_settings
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 42 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=melibu-plugin-syntax-admin-control-menu-1
    • > Warning in wp-content/plugins/syntax-high-lighter/classes/class.MelibuBackendMetaBox.php+36
    count(): Parameter must be an array or an object that implements Countable

SRP 0% 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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/syntax-high-lighter/html/panel/appearance.php
    • > /wp-content/plugins/syntax-high-lighter/html/panel/privacy.php
    • > /wp-content/plugins/syntax-high-lighter/html/panel/optional.php
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/syntax-high-lighter/classes/class.MelibuFrontend.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/syntax-high-lighter/html/panel/display.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function settings() on null in wp-content/plugins/syntax-high-lighter/html/tpl/syntax_colors.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function settings() on null in wp-content/plugins/syntax-high-lighter/html/tpl/syntax_css.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/syntax-high-lighter/html/panel/dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/syntax-high-lighter/html/doc.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/syntax-high-lighter/html/other/syntax_settings_form.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/syntax-high-lighter/html/panel/modal.php:5
    • > PHP Notice
      Undefined variable: MELIBU_SYNTAX_HIGH_LIGHTER in wp-content/plugins/syntax-high-lighter/html/tpl/syntax_preview.php on line 59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/syntax-high-lighter/html/about.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=melibu-plugin-syntax-admin
    • > Network (severe)
    wp-content/plugins/syntax-high-lighter/screenshot-11.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

syntax-high-lighter/syntax-high-lighter.php 92% from 13 tests

The principal PHP file in "MeliBu WP Syntax High Lighter" v. 1.4.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 312 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin4,512 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP295008012,948
PO File37221,332976
JavaScript759155434
CSS46816154

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity11.80
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes220.00%
▷ Concrete classes880.00%
▷ Final classes00.00%
Methods66
▷ Static methods34.55%
▷ Public methods5278.79%
▷ Protected methods1319.70%
▷ Private methods11.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 PNG files occupy 4.15MB with 2.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-8.png457.83KB146.51KB▼ 68.00%
img/icon-MB-20.png1.97KB1.16KB▼ 41.49%
js/img/css3.png3.07KB1.68KB▼ 45.33%
img/linenumbers.png41.52KB12.33KB▼ 70.31%
img/css.png97.68KB31.95KB▼ 67.30%