84% insert-ads-on-post

Code Review | Insert Ads On Post

WordPress plugin Insert Ads On Post scored84%from 54 tests.

About plugin

  • Plugin page: insert-ads-on-post
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 6, 2016
  • Latest release: Feb 25, 2019
  • Number of updates: 19
  • Update frequency: every 60.5 days
  • Top authors: abyrafa (63.16%)rafaillah (42.11%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,295 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.49ms] Passed 4 tests

Server-side resources used by Insert Ads On Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.16 ▼6.11
Dashboard /wp-admin3.31 ▲0.0144.66 ▼1.75
Posts /wp-admin/edit.php3.36 ▲0.0145.79 ▼4.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.05 ▼21.23
Media Library /wp-admin/upload.php3.23 ▲0.0134.55 ▲3.42
Insert Ads On Post /wp-admin/options-general.php?page=insert-ads-on-post3.2033.63

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Insert Ads On Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.66 ▼0.961.71 ▼0.4445.92 ▼0.42
Dashboard /wp-admin2,210 ▲194.84 ▼0.07106.83 ▼0.8436.94 ▼7.62
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0134.73 ▼3.6730.47 ▼4.72
Add New Post /wp-admin/post-new.php1,536 ▲223.24 ▲0.17652.18 ▲61.2356.31 ▲5.28
Media Library /wp-admin/upload.php1,392 ▲74.23 ▼0.0597.46 ▼6.5645.88 ▲2.08
Insert Ads On Post /wp-admin/options-general.php?page=insert-ads-on-post9642.0325.5440.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/insert-ads-on-post/insert-ads-on-post.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: ads, money, banner, javascript, html...

insert-ads-on-post/insert-ads-on-post.php Passed 13 tests

"Insert Ads On Post" version 1.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
78 characters long description:
Insert adsense inside post content and page content. Start Insert Ads On Post.

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
Everything looks great! No dangerous files found in this plugin120 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11226120

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/faq.png0.66KB0.66KB▼ 1.18%