84% super-cool-ad-inserter

Code Review | Super Cool Ad Inserter Plugin

WordPress plugin Super Cool Ad Inserter Plugin scored84%from 54 tests.

About plugin

  • Plugin page: super-cool-ad-ins...
  • Plugin version: 0.6.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.8.0
  • WordPress version: 6.3.1
  • First release: Feb 23, 2016
  • Latest release: Dec 12, 2022
  • Number of updates: 30
  • Update frequency: every 83.3 days
  • Top authors: inn_nerds (50%)newspack (40%)innlabs (16.67%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /8,011 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.92ms] Passed 4 tests

Analyzing server-side resources used by Super Cool Ad Inserter Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.58 ▲7.83
Dashboard /wp-admin3.40 ▲0.0546.53 ▼14.12
Posts /wp-admin/edit.php3.51 ▲0.1547.03 ▲2.87
Add New Post /wp-admin/post-new.php5.98 ▲0.1085.34 ▼9.17
Media Library /wp-admin/upload.php3.32 ▲0.0937.87 ▲4.74
Ad Inserter /wp-admin/options-general.php?page=scaip3.2832.00

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Super Cool Ad Inserter Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.72 ▼0.721.71 ▲0.0143.81 ▼0.68
Dashboard /wp-admin2,210 ▲184.89 ▼0.03103.10 ▼4.4035.84 ▼7.31
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0135.69 ▲0.9435.85 ▲1.35
Add New Post /wp-admin/post-new.php6,400 ▲4,88127.57 ▲4.20885.86 ▲263.1156.16 ▲2.62
Media Library /wp-admin/upload.php1,392 ▲104.21 ▼0.0395.84 ▼0.4340.22 ▼1.19
Ad Inserter /wp-admin/options-general.php?page=scaip8302.0324.8126.38

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/super-cool-ad-inserter/inc/scaip-shortcode-inserter.php:228
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/super-cool-ad-inserter/inc/scaip-shortcode-inserter.php:228
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-cool-ad-inserter/inc/scaip-metaboxes.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-cool-ad-inserter/inc/scaip-settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-cool-ad-inserter/blocks/scaip-sidebar.php:67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/super-cool-ad-inserter/inc/scaip-shortcode.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
7 plugin tags: post, widget, shortcode, advertising, ads...

super-cool-ad-inserter/super-cool-ad-inserter-plugin.php 85% from 13 tests

This is the main PHP file of "Super Cool Ad Inserter Plugin" version 0.6.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("super-cool-ad-inserter.php" instead of "super-cool-ad-inserter-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin577 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP671231406
JavaScript11063117
Markdown168054

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions2291.67%
▷ Anonymous functions28.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected