78% wp-insert-code

Code Review | WP Insert Code

WordPress plugin WP Insert Code scored 78% from 54 tests.

About plugin

  • Plugin page: wp-insert-code
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Apr 25, 2015
  • Number of updates: 3
  • Update frequency: every 36.0 days
  • Top authors: AntonHoelstad (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 29,985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.03ms] Passed 4 tests

This is a short check of server-side resources used by WP Insert Code
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.99 ▼6.22
Dashboard /wp-admin3.34 ▲0.0446.80 ▼3.15
Posts /wp-admin/edit.php3.39 ▲0.0346.90 ▼5.74
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.77 ▼20.99
Media Library /wp-admin/upload.php3.27 ▲0.0335.64 ▲1.46
WP Insert Code /wp-admin/options-general.php?page=ju-ic-code3.2128.33

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Insert Code
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.154.78 ▲2.8641.28 ▼1.21
Dashboard /wp-admin2,210 ▲244.89 ▼0.05113.34 ▼6.4442.83 ▼1.32
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0338.25 ▼3.4334.68 ▼1.08
Add New Post /wp-admin/post-new.php1,536 ▲823.39 ▲5.14596.52 ▼20.3749.22 ▼6.36
Media Library /wp-admin/upload.php1,392 ▲74.21 ▲0.0697.56 ▼1.5741.20 ▼3.40
WP Insert Code /wp-admin/options-general.php?page=ju-ic-code8272.0224.4030.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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 server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=ju-ic-code
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ju-ic-code
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-insert-code/index.php:204

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: insert code, footer, body, header, insert script

wp-insert-code/index.php 92% from 13 tests

The principal PHP file in "WP Insert Code" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-insert-code.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin157 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13555157

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin