84% simple-syntax-highlighting

Code Review | Simple Syntax Highlighting

WordPress plugin Simple Syntax Highlighting scored 84% from 54 tests.

About plugin

  • Plugin page: simple-syntax-hig...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jan 20, 2018
  • Latest release: May 25, 2018
  • Number of updates: 7
  • Update frequency: every 18.4 days
  • Top authors: gung (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 6,466 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
This plugin's installer ran successfully

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

Server-side resources used by Simple Syntax Highlighting
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.84 ▼2.11
Dashboard /wp-admin3.31 ▲0.0145.32 ▼5.59
Posts /wp-admin/edit.php3.37 ▲0.0149.11 ▲1.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.96 ▼5.28
Media Library /wp-admin/upload.php3.24 ▲0.0137.59 ▲4.73
Simple Syntax Highlighting /wp-admin/options-general.php?page=ssh3.2032.05

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Syntax Highlighting
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5413.25 ▼1.133.25 ▲1.1842.84 ▼4.93
Dashboard /wp-admin2,210 ▲194.83 ▼0.09106.10 ▼1.4939.96 ▼5.09
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0038.62 ▲2.7435.93 ▲2.19
Add New Post /wp-admin/post-new.php1,539 ▲623.47 ▲0.06635.50 ▼21.7248.98 ▼11.64
Media Library /wp-admin/upload.php1,389 ▲14.19 ▼0.0095.23 ▼4.1842.11 ▼2.88
Simple Syntax Highlighting /wp-admin/options-general.php?page=ssh8022.0227.4623.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-syntax-highlighting/simple-syntax-highlighting.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
Attributes that require attention: You can look at the official readme.txt

simple-syntax-highlighting/simple-syntax-highlighting.php 92% from 13 tests

The principal PHP file in "Simple Syntax Highlighting" v. 1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 300 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin113 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1111494
JavaScript30118
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions9
▷ Named functions9100.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
There are no PNG files in this plugin