83% simpler-syntax-highlighter

Code Review | Simpler Syntax Highlighter

WordPress plugin Simpler Syntax Highlighter scored83%from 54 tests.

About plugin

  • Plugin page: simpler-syntax-hi...
  • Plugin version: 1.0.2
  • PHP compatiblity: 4.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2018
  • Latest release: Jan 22, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Petrichorpost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /616 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.81ms] Passed 4 tests

This is a short check of server-side resources used by Simpler Syntax Highlighter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.99 ▼4.89
Dashboard /wp-admin3.32 ▲0.0246.30 ▼4.31
Posts /wp-admin/edit.php3.37 ▲0.0249.27 ▲0.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.65 ▼22.30
Media Library /wp-admin/upload.php3.25 ▲0.0236.38 ▲0.27

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Simpler Syntax Highlighter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲6514.28 ▼0.142.78 ▲0.8637.95 ▼5.53
Dashboard /wp-admin2,195 ▲185.60 ▼0.0589.49 ▼5.0139.70 ▼1.70
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0241.08 ▲3.6837.18 ▼1.33
Add New Post /wp-admin/post-new.php1,528 ▲223.23 ▲0.28695.94 ▲31.3951.87 ▼1.85
Media Library /wp-admin/upload.php1,397 ▼04.15 ▼0.07101.84 ▼1.6648.93 ▲6.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simpler-syntax-highlighter/simpler-syntax-highlighter.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (PHP Syntax Highlighting Sample), #2 (View Code in Plain Text), #3 (About Simple Syntax Highlighting)
The official readme.txt is a good inspiration

simpler-syntax-highlighter/simpler-syntax-highlighter.php 77% from 13 tests

The main file in "Simpler Syntax Highlighter" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 304 characters long)

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
There were no executable files found in this plugin1,195 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript162193811,014
CSS1296150
PHP191330
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.04
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.64KB8.08KB▼ 48.35%
assets/icon-256x256.png9.51KB4.20KB▼ 55.89%
screenshot-2.png8.69KB4.88KB▼ 43.81%
assets/icon-128x128.png5.16KB2.67KB▼ 48.22%
screenshot-3.png10.29KB5.77KB▼ 43.97%