83% easy-syntax-highlighter

Code Review | Easy Syntax Highlighter

WordPress plugin Easy Syntax Highlighter scored83%from 54 tests.

About plugin

  • Plugin page: easy-syntax-highl...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 28, 2017
  • Latest release: Jun 28, 2017
  • Number of updates: 7
  • Update frequency: every 7.3 days
  • Top authors: snowbedding (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /908 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.66ms] Passed 4 tests

Analyzing server-side resources used by Easy Syntax Highlighter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0225.72 ▼14.63
Dashboard /wp-admin3.37 ▲0.0747.12 ▼5.45
Posts /wp-admin/edit.php3.42 ▲0.0644.44 ▲0.76
Add New Post /wp-admin/post-new.php5.95 ▲0.0679.99 ▼12.40
Media Library /wp-admin/upload.php3.29 ▲0.0634.30 ▼2.15
Easy Syntax Highlighter /wp-admin/options-general.php?page=easy-syntax-highlighter3.2629.98

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Easy Syntax Highlighter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9214.17 ▼0.268.98 ▲7.2743.43 ▲5.69
Dashboard /wp-admin2,213 ▲255.85 ▲0.96114.14 ▲9.4442.18 ▲0.06
Posts /wp-admin/edit.php2,090 ▲12.01 ▲0.0235.59 ▼3.5533.85 ▲0.35
Add New Post /wp-admin/post-new.php1,548 ▲618.09 ▼4.68629.13 ▼28.7048.10 ▼6.90
Media Library /wp-admin/upload.php1,386 ▼24.21 ▼0.0297.38 ▼3.9542.69 ▼1.23
Easy Syntax Highlighter /wp-admin/options-general.php?page=easy-syntax-highlighter9541.8424.7228.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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 following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-syntax-highlighter/index.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

easy-syntax-highlighter/index.php 85% from 13 tests

The entry point to "Easy Syntax Highlighter" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-syntax-highlighter.php" instead of "index.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,464 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript353901,8162,205
PHP13820188
CSS3275471

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin