83% code-widget

Code Review | Code Widget

WordPress plugin Code Widget scored 83% from 54 tests.

About plugin

  • Plugin page: code-widget
  • Plugin version: 1.0.14
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Mar 22, 2018
  • Latest release: Jul 31, 2021
  • Number of updates: 36
  • Update frequency: every 34.2 days
  • Top authors: sharaz (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

6,000+ active / 31,620 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼145.91ms] Passed 4 tests

Analyzing server-side resources used by Code Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0832.80 ▼2.63
Dashboard /wp-admin3.14 ▲0.0855.36 ▲7.95
Posts /wp-admin/edit.php3.19 ▲0.0852.79 ▲4.33
Add New Post /wp-admin/post-new.php5.50 ▲0.0696.43 ▼590.02
Media Library /wp-admin/upload.php3.08 ▲0.0840.44 ▲4.68

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Code Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.88 ▼0.1410.55 ▲0.1554.59 ▲7.19
Dashboard /wp-admin2,967 ▲365.89 ▼0.27147.66 ▼18.79116.91 ▼7.14
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0172.37 ▼0.3995.17 ▲0.58
Add New Post /wp-admin/post-new.php1,591 ▼9218.80 ▲0.38413.75 ▲23.98113.74 ▼11.24
Media Library /wp-admin/upload.php1,807 ▼35.03 ▼0.02152.11 ▼9.31123.90 ▼12.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 2 options in the database
    • widget_codewidget
    • cw_activation_time

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function solbox_plugin_feedback\\is_admin() in wp-content/plugins/code-widget/lib/solbox-plugin-deactivation-survey/deactivate-feedback-form.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: code, blocks, html, short code, widget...

code-widget/class-code-widget.php 77% from 13 tests

The primary PHP file in "Code Widget" version 1.0.14 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("code-widget.php" instead of "class-code-widget.php")
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Description: Please don't use more than 140 characters for the plugin description (currently 209 characters long)

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
No dangerous file extensions were detected787 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods19.09%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
▷ Named functions250.00%
▷ Anonymous functions250.00%
▷ Global constants4100.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