83% wp-insert

Code Review | Wp-Insert

WordPress plugin Wp-Insert scored83%from 54 tests.

About plugin

  • Plugin page: wp-insert
  • Plugin version: 2.5.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 5, 2009
  • Latest release: Feb 8, 2023
  • Number of updates: 137
  • Update frequency: every 36.7 days
  • Top authors: namith.jawahar (100%)

Code review

54 tests

User reviews

139 reviews

Install metrics

10,000+ active /738,880 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: ▲1.03MB] [CPU: ▲2.25ms] Passed 4 tests

This is a short check of server-side resources used by Wp-Insert
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.55 ▲1.0948.19 ▲8.59
Dashboard /wp-admin4.36 ▲1.0663.60 ▲11.69
Posts /wp-admin/edit.php4.41 ▲1.0659.69 ▲6.66
Add New Post /wp-admin/post-new.php6.90 ▲1.0189.54 ▼17.95
Media Library /wp-admin/upload.php4.22 ▲1.0054.70 ▲14.25

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 417 new files
Database: no new tables, 9 new options
New WordPress options
wp_insert_legalpages
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
wp_insert_version
widget_wp_insert_ad_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Wp-Insert
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.24 ▼1.171.72 ▲0.0449.23 ▲9.64
Dashboard /wp-admin2,208 ▲175.90 ▲0.02111.00 ▲9.4688.79 ▲44.15
Posts /wp-admin/edit.php2,112 ▲232.02 ▼0.0236.68 ▼4.6830.83 ▼5.79
Add New Post /wp-admin/post-new.php6,369 ▲4,83528.35 ▲4.98966.20 ▲276.3042.98 ▼10.72
Media Library /wp-admin/upload.php1,399 ▲114.22 ▲0.11102.56 ▼21.3683.12 ▲34.89

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_wp_insert_ad_widget
    • widget_recent-comments
    • wp_insert_legalpages
    • can_compress_scripts
    • widget_theysaidso_widget
    • wp_insert_version
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 26× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/general/videointelligence/gdpr.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/core/adstxt/adsense.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/general/shortcode/module.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/core/gutenberg/module.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/general/legalpages/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/general/google/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/general/inpost/module.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/core/units/geo-targeting.php:290
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/core/abtesting/module.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-insert/includes/modules/core/misc/module.php:3

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
  • Screenshots: Add descriptions for screenshots #10, #11, #12, #13, #14 in wp-insert/assets to your readme.txt
Please take inspiration from this readme.txt

wp-insert/wp-insert.php Passed 13 tests

The entry point to "Wp-Insert" version 2.5.1 is a PHP file that has certain tags in its header comment area
84 characters long description:
WP-INSERT by SMARTLOGIX : The Ultimate Adsense / Ad-Management Plugin for WordPress

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin274,609 lines of code in 392 files:
LanguageFilesBlank linesComment linesLines of code
PHP367332290254,838
JavaScript173,3952,75817,817
CSS5342251,926
Markdown311028

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 350)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity190.00
▷ Minimum class complexity12.00
▷ Maximum class complexity483.00
Average method complexity21.25
▷ Minimum method complexity1.00
▷ Maximum method complexity350.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods1760.71%
▷ Protected methods00.00%
▷ Private methods1139.29%
Functions165
▷ Named functions16499.39%
▷ Anonymous functions10.61%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/modules/core/controls/images/jquery-te.png2.54KB1.71KB▼ 32.81%
includes/modules/general/videointelligence/images/privacy.png0.89KB0.89KB0.44%
includes/assets/images/vi-logo-small.png2.56KB0.96KB▼ 62.63%
includes/assets/images/vi-big-logo.png4.20KB2.73KB▼ 35.10%
includes/assets/images/vi-logo-large.png7.66KB3.12KB▼ 59.29%