10% auto-insert-content

Code Review | Auto Content Inserter

WordPress plugin Auto Content Inserter scored10%from 54 tests.

About plugin

  • Plugin page: auto-insert-content
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 24, 2018
  • Latest release: Jul 24, 2018
  • Number of updates: 3
  • Update frequency: every 14.3 days
  • Top authors: evidentlycube (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /715 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/auto-insert-content/logic.php+39
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.90MB] [CPU: ▼55.21ms] Passed 4 tests

Analyzing server-side resources used by Auto Content Inserter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.76 ▼36.06
Dashboard /wp-admin2.11 ▼1.195.82 ▼47.06
Posts /wp-admin/edit.php2.11 ▼1.255.47 ▼41.01
Add New Post /wp-admin/post-new.php2.11 ▼3.785.95 ▼96.70
Media Library /wp-admin/upload.php2.11 ▼1.125.72 ▼32.07
Auto insert content /wp-admin/options-general.php?page=auto-insert-content2.116.08

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

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Content Inserter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.36 ▲0.011.67 ▲0.0539.78 ▼2.40
Dashboard /wp-admin2,199 ▲195.63 ▼0.0084.10 ▼9.0039.32 ▼1.00
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.0040.57 ▲0.2534.28 ▼6.26
Add New Post /wp-admin/post-new.php1,538 ▲1218.36 ▼4.52637.50 ▲20.0973.57 ▲6.33
Media Library /wp-admin/upload.php1,404 ▲74.22 ▲0.02101.12 ▼0.0645.38 ▼1.91
Auto insert content /wp-admin/options-general.php?page=auto-insert-content8451.9922.3830.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/auto-insert-content/logic.php+39
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • evidcube_aic_meta
    • theysaidso_admin_options
    • 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 server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=auto-insert-content
    • > Deprecated in wp-content/plugins/auto-insert-content/logic.php+39
    Array and string offset access syntax with curly braces is deprecated

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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-insert-content/index.php:67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/auto-insert-content/templates/admin-view.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

auto-insert-content/index.php 92% from 13 tests

The main PHP file in "Auto Content Inserter" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("auto-insert-content.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin413 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP67313302
PO File22424111

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods19
▷ Static methods19100.00%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin