79% ry-code-highlight

Code Review | RY Code Highlight

WordPress plugin RY Code Highlight scored 79% from 54 tests.

About plugin

  • Plugin page: ry-code-highlight
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.6.1
  • WordPress version: 5.8.1
  • First release: Dec 10, 2016
  • Latest release: Apr 10, 2018
  • Number of updates: 10
  • Update frequency: every 48.2 days
  • Top authors: fantasyworld (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 521 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼151.75ms] Passed 4 tests

An overview of server-side resources used by RY Code Highlight
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.0925.91 ▼2.43
Dashboard /wp-admin3.19 ▲0.1335.98 ▼7.49
Posts /wp-admin/edit.php3.31 ▲0.1933.54 ▼1.22
Add New Post /wp-admin/post-new.php5.56 ▲0.1274.43 ▼595.87
Media Library /wp-admin/upload.php3.14 ▲0.1325.78 ▼0.41
RY Code Highlight /wp-admin/options-general.php?page=ry-code-highlight3.0824.47

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 4 new options
New WordPress options
RY_CHL_use_cdn
RY_CHL_version
RY_CHL_use_code_shortcode
RY_CHL_color_theme

Browser metrics Passed 4 tests

Checking browser requirements for RY Code Highlight
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲6915.67 ▼0.295.06 ▼1.6973.21 ▲0.56
Dashboard /wp-admin2,935 ▲366.13 ▼0.08117.69 ▼15.11167.94 ▲0.57
Posts /wp-admin/edit.php2,742 ▼13.24 ▲0.0163.26 ▲0.51136.02 ▼4.95
Add New Post /wp-admin/post-new.php4,264 ▲55821.34 ▲2.49415.83 ▼10.32178.42 ▲12.53
Media Library /wp-admin/upload.php1,757 ▲55.51 ▲0.02145.20 ▲1.16184.41 ▲2.24
RY Code Highlight /wp-admin/options-general.php?page=ry-code-highlight1,2142.4156.90132.34

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
  • The uninstall procedure has failed, leaving 4 options in the database
    • RY_CHL_use_code_shortcode
    • RY_CHL_use_cdn
    • RY_CHL_version
    • RY_CHL_color_theme

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=ry-code-highlight
    • > Notice in wp-content/plugins/ry-code-highlight/class.admin.php+47
    Undefined index: tab

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ry-code-highlight/class.main.php
    • > /wp-content/plugins/ry-code-highlight/class.update.php
    • > /wp-content/plugins/ry-code-highlight/class.admin-html.php
    • > /wp-content/plugins/ry-code-highlight/ry-code-highlight.php
    • > /wp-content/plugins/ry-code-highlight/class.admin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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
3 plugin tags: highlight, code, shortcode

ry-code-highlight/ry-code-highlight.php Passed 13 tests

The primary PHP file in "RY Code Highlight" version 1.0.2 is used by WordPress to initiate all plugin functionality
17 characters long description:
Highlighted code.

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
Success! There were no dangerous files found in this plugin5,179 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
CSS18252723,488
JavaScript28189518994
PHP57212584
PO File14447113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity18.25
▷ Minimum class complexity5.00
▷ Maximum class complexity42.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods30100.00%
▷ Public methods2686.67%
▷ Protected methods413.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 files were detected