74% ad-itt

Code Review | Ad Itt

WordPress plugin Ad Itt scored 74% from 54 tests.

About plugin

  • Plugin page: ad-itt
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 5.9.2
  • First release: Jan 22, 2013
  • Latest release: Oct 28, 2014
  • Number of updates: 9
  • Update frequency: every 71.6 days
  • Top authors: MMDeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,381 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.93MB] [CPU: ▼311.92ms] Passed 4 tests

Server-side resources used by Ad Itt
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3153.54 ▲2.57
Dashboard /wp-admin3.39 ▼0.0129.31 ▼3.24
Posts /wp-admin/edit.php3.41 ▼0.2360.33 ▲23.32
Add New Post /wp-admin/post-new.php3.40 ▼3.5718.97 ▼1,240.03
Media Library /wp-admin/upload.php3.40 ▲0.1017.90 ▼6.98

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 19 new options
New WordPress options
enable_top_ad_link
top_ad_link
right_ad_position
bottom_ad_position
enable_right_ad_link
left_ad_link
bottom_ad_img
top_ad_close_img
enable_left_ad_link
right_ad_link
...

Browser metrics Passed 4 tests

A check of browser resources used by Ad Itt
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,947 ▲22516.02 ▲0.3710.32 ▲4.112.68 ▲0.31
Dashboard /wp-admin2,941 ▲876.14 ▲0.02119.01 ▼15.93156.02 ▼1.98
Posts /wp-admin/edit.php2,737 ▲433.25 ▲0.0171.77 ▲10.26146.53 ▲2.91
Add New Post /wp-admin/post-new.php1,691 ▼8216.27 ▼5.88414.36 ▼31.72157.00 ▼0.03
Media Library /wp-admin/upload.php1,744 ▲465.53 ▲0.03135.78 ▼5.83184.34 ▼2.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/ad-itt/ad-itt.php+30
    Undefined index: filter_image_name
  • This plugin does not fully uninstall, leaving 19 options in the database
    • top_ad_img
    • left_ad_position
    • top_ad_link
    • css_content_wrapper_selector
    • enable_left_ad_link
    • right_ad_link
    • bottom_ad_position
    • bottom_ad_img
    • enable_top_ad_link
    • top_ad_close_img
    • ...

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ad-itt/ad-itt.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

ad-itt/ad-itt.php Passed 13 tests

The main PHP script in "Ad Itt" version 2.0 is automatically included on every request by WordPress
36 characters long description:
Adds advertisements to your website.

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 plugin2,297 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21841081,412
JavaScript2113220855
CSS10030

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity207.00
▷ Minimum class complexity207.00
▷ Maximum class complexity207.00
Average method complexity6.02
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
No PNG files were detected