10% insert-this-intelligent-content-inserts

Code Review | Insert This! Content Inserts

WordPress plugin Insert This! Content Inserts scored10%from 54 tests.

About plugin

  • Plugin page: insert-this-intel...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.61
  • WordPress version: 6.3.1
  • First release: Mar 10, 2013
  • Latest release: Nov 17, 2013
  • Number of updates: 10
  • Update frequency: every 27.8 days
  • Top authors: karlazz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,647 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/insert-this-intelligent-content-inserts/insertthis.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; ici_inserts_widget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼58.76ms] Passed 4 tests

Server-side resources used by Insert This! Content Inserts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.334.26 ▼38.42
Dashboard /wp-admin2.15 ▼1.156.50 ▼50.82
Posts /wp-admin/edit.php2.15 ▼1.217.44 ▼45.50
Add New Post /wp-admin/post-new.php2.15 ▼3.746.82 ▼100.30
Media Library /wp-admin/upload.php2.15 ▼1.084.83 ▼27.23
Tags /wp-admin/edit-tags.php?taxonomy=inserts_tag&post_type=inserts2.156.36
Types /wp-admin/edit-tags.php?taxonomy=inserts_type&post_type=inserts2.156.80
Inserts /wp-admin/edit.php?post_type=inserts2.156.03
Add New /wp-admin/post-new.php?post_type=inserts2.156.30

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_ici_inserts_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Insert This! Content Inserts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.17 ▼0.071.66 ▲0.0040.51 ▼2.28
Dashboard /wp-admin2,217 ▲435.51 ▼0.1094.99 ▲2.2065.30 ▲17.88
Posts /wp-admin/edit.php2,140 ▲401.99 ▼0.0237.83 ▼2.1333.13 ▼6.52
Add New Post /wp-admin/post-new.php1,708 ▲17922.32 ▼0.76610.43 ▼6.6445.00 ▼4.66
Media Library /wp-admin/upload.php1,437 ▲374.14 ▼0.07110.14 ▲11.2745.91 ▲5.55
Tags /wp-admin/edit-tags.php?taxonomy=inserts_tag&post_type=inserts1,2832.1230.8231.82
Types /wp-admin/edit-tags.php?taxonomy=inserts_type&post_type=inserts1,3112.2728.9433.13
Inserts /wp-admin/edit.php?post_type=inserts1,1771.9232.9828.94
Add New /wp-admin/post-new.php?post_type=inserts2,4057.67171.76130.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Deprecated in wp-content/plugins/insert-this-intelligent-content-inserts/insertthis.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; ici_inserts_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_ici_inserts_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=inserts
    • > Deprecated in wp-content/plugins/insert-this-intelligent-content-inserts/insertthis.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; ici_inserts_widget has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=inserts
    • > Deprecated in wp-content/plugins/insert-this-intelligent-content-inserts/insertthis.php+121
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=inserts
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ici_inserts_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/edit.php?post_type=inserts
    • > Notice in wp-content/plugins/insert-this-intelligent-content-inserts/insertthis.php+365
    Trying to get property 'label' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=inserts
    • > Notice in wp-includes/class-walker-category-dropdown.php+76
    Trying to get property 'term_id' of non-object
    • > GET request to /wp-admin/edit.php?post_type=inserts
    • > Notice in wp-includes/class-walker-category-dropdown.php+65
    Trying to get property 'name' of non-object
    • > GET request to /wp-admin/edit.php?post_type=inserts
    • > Notice in wp-includes/class-walker-category-dropdown.php+82
    Trying to get property 'count' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/insert-this-intelligent-content-inserts/insertthis.php:30

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("none!")
  • Screenshots: Screenshot #1 (none :-() image required
The official readme.txt might help

insert-this-intelligent-content-inserts/insertthis.php 92% from 13 tests

The main file in "Insert This! Content Inserts" v. 1.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("insert-this-intelligent-content-inserts.php" instead of "insertthis.php")

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
Success! There were no dangerous files found in this plugin307 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15345307

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/light-bulb.png1.52KB0.74KB▼ 51.19%
images/light-bulb-gray.png1.50KB0.75KB▼ 50.29%