10% code-snippets-by-webpals

Code Review | Code Injection For WYSIWYG

WordPress plugin Code Injection For WYSIWYG scored10%from 54 tests.

About plugin

  • Plugin page: code-snippets-by-...
  • Plugin version: 3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Dec 11, 2013
  • Latest release: Dec 16, 2013
  • Number of updates: 23
  • Update frequency: every 5.1 days
  • Top authors: natyh83 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,483 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/code-snippets-by-webpals/db_handler.php+8
    Use of undefined constant SHORTCODE_PLUGIN_TABLE_NAME - assumed 'SHORTCODE_PLUGIN_TABLE_NAME' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.30ms] Passed 4 tests

An overview of server-side resources used by Code Injection For WYSIWYG
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.85 ▼5.17
Dashboard /wp-admin3.31 ▲0.0048.54 ▼16.35
Posts /wp-admin/edit.php3.36 ▲0.0048.59 ▼4.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.03 ▼11.59
Media Library /wp-admin/upload.php3.23 ▲0.0040.01 ▲4.90

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Code Injection For WYSIWYG
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.022.02 ▲0.3141.86 ▼2.75
Dashboard /wp-admin2,189 ▲125.55 ▼0.0986.07 ▼2.5040.64 ▼4.88
Posts /wp-admin/edit.php2,100 ▲31.97 ▼0.0435.76 ▼1.5232.55 ▼1.35
Add New Post /wp-admin/post-new.php1,526 ▼223.03 ▼0.10671.19 ▼12.1654.60 ▲1.28
Media Library /wp-admin/upload.php1,397 ▼34.27 ▲0.1798.14 ▼3.0341.05 ▼0.94

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/code-snippets-by-webpals/code_snippet_backend_class.php on line 90
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/code-snippets-by-webpals/code_snippet_backend_class.php on line 90
    • > PHP Warning
      Use of undefined constant SHORTCODE_PLUGIN_TABLE_NAME - assumed 'SHORTCODE_PLUGIN_TABLE_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/code-snippets-by-webpals/db_handler.php on line 8
    • > PHP Warning
      Use of undefined constant SHORTCODE_PLUGIN_TABLE_NAME - assumed 'SHORTCODE_PLUGIN_TABLE_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/code-snippets-by-webpals/db_handler.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
  • License uri: Invalid URI found ("")
Please take inspiration from this readme.txt

code-snippets-by-webpals/code-snippets.php 92% from 13 tests

Analyzing the main PHP file in "Code Injection For WYSIWYG" version 3.3
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("code-snippets-by-webpals.php" instead of "code-snippets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected187 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53440167
JavaScript16620

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.67
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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