89% easy-prism-syntax-highlighter

Code Review | Easy Prism Syntax Highlighter

WordPress plugin Easy Prism Syntax Highlighter scored89%from 54 tests.

About plugin

  • Plugin page: easy-prism-syntax...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 18, 2014
  • Latest release: Dec 20, 2014
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: Cuamckuy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,812 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Easy Prism Syntax Highlighter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.80 ▼0.54
Dashboard /wp-admin3.31 ▲0.0147.00 ▲1.34
Posts /wp-admin/edit.php3.36 ▲0.0141.43 ▼4.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.88 ▼2.77
Media Library /wp-admin/upload.php3.24 ▲0.0133.53 ▲0.67

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Easy Prism Syntax Highlighter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▼0.271.98 ▼0.0343.98 ▼1.37
Dashboard /wp-admin2,209 ▲215.86 ▲1.00105.93 ▼9.9641.27 ▼1.64
Posts /wp-admin/edit.php2,086 ▼62.00 ▼0.0033.51 ▼2.6234.50 ▼1.37
Add New Post /wp-admin/post-new.php1,534 ▲123.43 ▲0.11672.35 ▲21.7455.21 ▼4.62
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0097.95 ▼1.2342.73 ▲1.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: syntax, prism, highlight, code

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

The main PHP file in "Easy Prism Syntax Highlighter" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/lang")

Code Analysis Passed 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 plugin350 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS1318167
PHP22012670
JavaScript21259
Markdown119029
CoffeeScript11025

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin