84% code-highlight

Code Review | Code Highlight

WordPress plugin Code Highlight scored84%from 54 tests.

About plugin

  • Plugin page: code-highlight
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7
  • WordPress version: 6.3.1
  • First release: Nov 11, 2013
  • Latest release: Nov 11, 2013
  • Number of updates: 11
  • Update frequency: every 0.9 days
  • Top authors: wordpresssites (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,099 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.01MB] [CPU: ▼4.62ms] Passed 4 tests

A check of server-side resources used by Code Highlight
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.87 ▼1.01
Dashboard /wp-admin3.31 ▲0.0152.16 ▼2.43
Posts /wp-admin/edit.php3.36 ▲0.0150.71 ▼6.03
Add New Post /wp-admin/post-new.php5.89 ▲0.01101.53 ▼9.01
Media Library /wp-admin/upload.php3.23 ▲0.0038.19 ▲5.15

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Code Highlight: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3613.52 ▼0.8310.74 ▲9.0744.97 ▲3.15
Dashboard /wp-admin2,198 ▲215.50 ▼0.1085.06 ▼2.9837.74 ▼3.50
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0634.34 ▼7.9631.68 ▼6.95
Add New Post /wp-admin/post-new.php1,529 ▲123.24 ▲0.17663.47 ▼25.9852.28 ▲3.74
Media Library /wp-admin/upload.php1,403 ▼04.24 ▼0.05103.39 ▲1.5146.50 ▲3.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/code-highlight/code-highlight.php:11

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: code, syntax higlighter, code highlighter, code prettify, google code prettify

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

The principal PHP file in "Code Highlight" v. 1.0.0 is loaded by WordPress automatically on each request
55 characters long description:
Highlight your code using Googles Code Prettify Script.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected81 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10034
CSS12329
PHP162618

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin