78% wpc-insert-code

Code Review | Insert Code by Angie Makes

WordPress plugin Insert Code by Angie Makes scored78%from 54 tests.

About plugin

  • Plugin page: wpc-insert-code
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-4.7.2
  • WordPress version: 6.3.1
  • First release: May 17, 2014
  • Latest release: May 10, 2017
  • Number of updates: 9
  • Update frequency: every 121.1 days
  • Top authors: cbaldelomar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /24,081 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.06MB] [CPU: ▼8.66ms] Passed 4 tests

Analyzing server-side resources used by Insert Code by Angie Makes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.62 ▼1.71
Dashboard /wp-admin3.38 ▲0.0350.72 ▼11.92
Posts /wp-admin/edit.php3.49 ▲0.1445.29 ▼10.97
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.04 ▼10.02
Media Library /wp-admin/upload.php3.30 ▲0.0735.66 ▲2.00
Insert Code /wp-admin/options-general.php?page=wpc-insert-code3.2933.95

Server storage [IO: ▲0.05MB] [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: 29 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Insert Code by Angie Makes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.07 ▼0.481.99 ▲0.3243.97 ▼1.59
Dashboard /wp-admin2,202 ▲255.69 ▲0.1190.82 ▼23.2842.24 ▼16.22
Posts /wp-admin/edit.php2,101 ▲11.98 ▼0.0236.06 ▼5.7334.92 ▼1.96
Add New Post /wp-admin/post-new.php1,531 ▲323.04 ▼0.01676.62 ▼4.4751.68 ▲0.50
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.0598.51 ▼21.0846.54 ▼1.20
Insert Code /wp-admin/options-general.php?page=wpc-insert-code8321.9924.9329.89

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wpc-insert-code/public/views/public.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wpc-insert-code/admin/views/admin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
Please take inspiration from this readme.txt

wpc-insert-code/wpc-insert-code.php Passed 13 tests

The main PHP script in "Insert Code by Angie Makes" version 1.2 is automatically included on every request by WordPress
81 characters long description:
Easily insert HTML, Javascript, CSS, into the head and footer areas of your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected385 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP9130403318
Markdown118036
CSS26721
JavaScript28110

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.00
▷ Minimum class complexity6.00
▷ Maximum class complexity26.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods517.24%
▷ Public methods2689.66%
▷ Protected methods00.00%
▷ Private methods310.34%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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