84% io-code-highlight

Code Review | io Code Highlight

WordPress plugin io Code Highlight scored84%from 54 tests.

About plugin

  • Plugin page: io-code-highlight
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 6, 2022
  • Latest release: Aug 6, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: owen0o0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by io Code Highlight
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.09 ▼5.12
Dashboard /wp-admin3.34 ▲0.0445.22 ▼8.53
Posts /wp-admin/edit.php3.39 ▲0.0351.34 ▲3.13
Add New Post /wp-admin/post-new.php5.87 ▼0.0187.05 ▼11.85
Media Library /wp-admin/upload.php3.26 ▲0.0342.68 ▲9.86

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for io Code Highlight
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.73 ▲0.431.84 ▲0.0541.41 ▼2.91
Dashboard /wp-admin2,200 ▲295.64 ▲0.1387.34 ▼7.3536.81 ▼4.20
Posts /wp-admin/edit.php2,099 ▼12.00 ▲0.0536.14 ▼8.5232.04 ▼7.40
Add New Post /wp-admin/post-new.php6,202 ▲4,67618.80 ▼4.82910.22 ▲264.8967.44 ▲5.51
Media Library /wp-admin/upload.php1,399 ▼44.18 ▼0.0499.30 ▼0.6443.45 ▲0.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 plugins_url() in wp-content/plugins/io-code-highlight/index.php:15

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: code, highlight, code syntax

io-code-highlight/index.php 85% from 13 tests

"io Code Highlight" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("io-code-highlight.php" instead of "index.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin6,188 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS491423,399
JavaScript458272,624
PHP42182165

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants5
▷ Global constants5100.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 were not PNG files found in your plugin